added a more c++ feature rich yet basic merge sort algoritm