changed getTeam method