Added a method to get user input