fixing mergesort