mediator pattern implementation sample