--Started the merge function