for merge function

not finished