wip - query processor