added setDuration