add duration attribute.