simplify mergesort