First working coars merging version