this line is executed when duration is `undefined`, such as the case where no duration is passed