more refactoring to correctly compute the number of schedules processed