implement multiMerge