Not understanding Next button / conditional logic