ammended mediator.py init script