oops, incorrect definition of for loops