Added merge method from mergesort