add validation checks for user input