Slightly altered team.py for dependency injection