extract using pair