add mediator design pattern.