add prototype and mediator design pattern