adding pause
adding function for user input