for loop updated