added method for returning all the valid words in a Trie