Last change to while function