added to checkOccurrences