mergesort modified