pep8 fixes in task1
make iterate a class, instead of a function returning an object