externalize query server