add config class and fix mediator