exporting user input to separate method