Relocated variable definition for loops