Use while loop instead of for loop