Thanks for your suggestions, I've decided to go with the smart iterator solution, it's given me the results that I need. The generator solution also seems interesting and I might try it out at a later point. -- The ByteBaker : http://www.bytebaker.com