rudimentary merge sort