middlewares can be objects with a handle function