implemented first basic exception handlers