Updated for loop