fix sentenceOccurrences() and subtract(). add more unit tests