Add duration functionality