This doesn't work correctly.  The ordering here causes the player name to be added to matchedPlayers regardless of what has been typed so far.