added exceptions and response class