updated the for loop

changed something to the for loop