move query logic to DNS class
support API queries via XMPP