Updating for loop