Implement calling the middlewares