can now define an array of middlewares