moved team list code to be in scope for the team arrays