wrote test for user input validation