updated duration computation