Add more logic to team management