Remove explicit declaration of variable for loop