detecting a pair