add error checking to user input