modify mergesort to correct