parsing for conditional logic