formatted methods into loadWordsFromFile