update for loop statements