added sendError