Added implementation of mergesort