moving the custom middlewares in a separate file