adding trie implementation