replaced trie vector implementation with set