4.2 Word Frequency: using array and hash (refined)