figured out all the functions in trie implementation