merging pattern