add duration validation