how are teams determined?