pattern mediator and visitor