added some comments to the merge pairs algorithm