add test code for trie