Added a method to receive user input.