change index for merge