rewritten iterator class to allow recursive crawl