added a caching trie