i'd like to see a shuffle before you start selecting valid pairs. the way its written, this will either always pair 'problem' (meaning they have an unallowed matchup) players with higher or lower ranked players. not sure which way this will go, I think it'll always pair them with higher ranked players but i'm not sure.