update Mediator C++ code