Added function for getting user input