initial trie tree implementation