make document_parser an iterator