merge sort implementation complete