fixed up the exit- wait for user to exit