Finally fixed the getTeam() function
Modifying new look for matches