implemented 95% of mediator code. needed to finish "io" module to reach 100%.