implemented WordOccurrencesMain