implement wordOccurences