two versions of merge sort