Intention revealing name issue here... I had to figure out what you were trying to do by reading the code.  Perhaps this should be renamed something like 'checkForPairsOfRank' or 'removePairsOfRank' or even 'findAndRemovePairsOfRank'