added a test to validate user input