full implementation
mergeddddd