Added mergesort method