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

        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 {
            

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