trie now store key-value pairs