added team limit function and corresponding alert