user input validation improvements