added custom error handlers