simplify fn get-revpairs