use a local variable for the loop