update the duration