Working on the two-step query mediator