tests for for loops and fixed bug in generator_utilities