updated duration logic