add mergesort and tests