adding ! before while loop