set proper type on duration argument