merge sort with comparer impl