added functionality until "calculate-duration"