First working version of Merge