Adding "team" to the api() function