changed mergesort class to template
changed mergesort class to template