min and max merging techniques