updated middlewares