Merge function added