closed a while loop