         if self.downloadDatafile == true {
             
             // initialize Optimizely Client from a datafile download
-            optimizelyManager?.initializeClient(callback: { [weak self] (error, optimizelyClient) in
+            optimizelyManager?.initialize(callback: { [weak self] (error, optimizelyClient) in
                 self?.optimizelyClient = optimizelyClient;
-                let variation = self?.optimizelyClient?.activateExperiment(self!.experimentKey, userId: self!.userId, attributes: self!.attributes)
+                let variation = self?.optimizelyClient?.activate(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)
+                self?.optimizelyClient?.track(self!.eventKey, userId: self!.userId, attributes: self!.attributes, eventValue: self!.revenue)
                 })
         } else {
             

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

            }
            
            // 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)
        }
        
        
