fixed iteration_test, split iteration algorithm further to create more hook-in points for testing