add validation for user input