Adding a simple merge function