Merge "combine max values and compare once"