optimized merge sort for higher orders of numbers