MY solution to longest_word.rb