refactor team_matcher