added while loop test for user input

added while loop test for user input