created merge part of mergesort alg