abstracted user input to getInput() function