merge sort and tests for the sort done