1st refactor anagram.rb