updated findWordsWithPrefix