completed mergesort