please update the while loop style for all the while loops in this pr also