add sanity check to user input