Updated trie.cpp