added exceptions for bad user input