merging sub-conditions