created the calculation of interruptions