fixed for loop definition