added exception handlers