add MiddlewareHandler