moved dispatcher to separate mediator module