better handle user input and screen output