added Trie implementation