added MiddlewaresTrait