finish compare-pair-do