move complex iteration methods into separate module (one of them has no tests, and it doesn't seem to behave correctly but I don't know enough about it to know for sure)