merge function incompete