add mergesort and heapsort