final trie version