Improved  merging method