optimize simple conditionals