first pass at the iterate helper, still wondering about naming. also, make pretty printing filter more robust just in case