mergeDivergent function

Merge divergent units