more thorough input validation for users