Modified merging algo to do final merge if end run is greater than threshold