add template: mergesort and quicksort