Change to a for loop