Wrote basic Merge function, but it's broken.