consolidate conditionals