Adding duration to DB calculation section