added a mediator, writing bid handler