merging with matching macros