Updated step-wise merging