             builder!.projectId = self.projectId
         }
         
-        let optimizelyManager = OPTLYManager.initWithBuilderBlock {(builder) in
+        let optimizelyManager = OPTLYManager.init {(builder) in
             builder!.projectId = self.projectId
             builder!.datafileManager = datafileManager!
             builder!.eventDispatcher = eventDispatcher

        if self.downloadDatafile == true {
            
            // initialize Optimizely Client from a datafile download
            optimizelyManager?.initializeClient(callback: { [weak self] (error, optimizelyClient) in
                self?.optimizelyClient = optimizelyClient;
                let variation = self?.optimizelyClient?.activateExperiment(self!.experimentKey, userId: self!.userId, attributes: self!.attributes)
                if (variation != nil) {
                    print("bucketed variation:", variation!.variationKey)
                }
                self?.optimizelyClient?.trackEvent(self!.eventKey, userId: self!.userId, attributes: self!.attributes, eventValue: self!.revenue)
                })
        } else {
            

            }
            
            // initialize Optimizely Client from a saved datafile
            let optimizelyClient = optimizelyManager?.initialize(withDatafile:jsonDatafile!)
            let variation = optimizelyClient?.activate(experimentKey, userId: userId, attributes: attributes)
            if (variation != nil) {
                print("bucketed variation:", variation!.variationKey)
            }
            optimizelyClient?.track(eventKey, userId: userId, attributes: attributes, eventValue:  revenue)
        }
        
        
