add trie query support