update trie tree