merge function added