added trie structure, preparing for lexicon