changed for loop to use auto