merging method complete