Use while instead of for loop