working on trie