added error handling for bad user input
added error handling for bad user input