update for loop pattern update