add param to setDuration