prefix trie seems to be working