done persistance pair algo