             topVC.presentViewController(CV.debugVC, animated: true, completion: nil)
         }
     }
+    
+    
+    
+    
+    
+// MARK: setter functions
+    
+    public class func setWindow(window :UIWindow) {
+        if (!CV.isSetup) {
+            Pesticide.setup()
+        }
+        CV.window = window
+    }
+    
+    public class func setDelegate(delegate :PesticideDelegate?) {
+        CV.delegate = delegate
+    }
 
-    // MARK: private functions
+    
+    
+    
+    
+// MARK: private functions
     
     private class func setup() {
         Pesticide.startLogging()

        return CV.debugVC
    }
    
    public class func setWindow(window :UIWindow) {
        if (!CV.isSetup) {
            Pesticide.setup()
            
        }
        CV.window = window
    }
    
    public class func toggle() {
        var topVC :UIViewController = topViewController(CV.window.rootViewController!)
        if (topVC.isKindOfClass(DebugTableController)) {

        Pesticide.addLabel("version:", label: BuildUtils.getVersionString())
        Pesticide.addLabel("build:", label: BuildUtils.getBuildNumberString())
        Pesticide.addLabel("hash:", label: BuildUtils.getGitHash())
        
        Pesticide.addTextInput("proxy", block: { (hostAndPort: String) in
            let config = Proxy.createSessionConfiguration(hostAndPort)
            CV.delegate?.didFinishSettingProxy(config)
        })
        
        CV.isSetup = true
    }
