cannot `occurrences` be zero here?