some refactoring
transmit query info.