added counting of unique words