make iteration at least a local variable