for loop update