formatted Mediator.java