Fixed loop structure, so that we the variable can be safely played with in the loop