Add some code to handle user input.