removed do from while loop