added explanation of conditional logic.