run middlewares on the collection instance