better user input handling