added inplace merge sort. median sort not working