added custom exceptions, added/updated tests to check for them being thrown