refactored merge sort a little