add mediator pattern