teambot refactored