fixing for loop typo