added optional exceptions
added optional exceptions