add the word statistics function