merge sort exercise