selectedteam function finished