full mediator refactoring