Change for loop to use ints