first pass on the Trie algo