adding support for new middlewares