rewrote team class as a standalone structure