word_sort method and accompanying test & rake files