added trie data structure