implement simple version of trie