misinterpreted nesting of for loop