change the while loop for the game