added variable and test for user input

added variable and test for user input