strip out user input into separate method