Modified trie class