change while loop format