remove recursion from trie.Insert()