revise for loop variables