fixed bug where prefixes were included
working on func to convert trie to array of strings