made changes in sorting_on_word.rb