changed how to determine number of repetitions and wrote a bit more of toCombinedEventList