mergesort and insort working