     }
     
     func em_pageViewController(_ pageViewController: EMPageViewController, viewControllerAfterViewController viewController: UIViewController) -> UIViewController? {
-        if let viewControllerIndex = self.indexOfViewController(viewController as! GreetingViewController) {
-            let afterViewController = self.viewControllerAtIndex(viewControllerIndex + 1)
+        if let viewControllerIndex = self.index(of: viewController as! GreetingViewController) {
+            let afterViewController = self.viewController(at: viewControllerIndex + 1)
             return afterViewController
         } else {
             return nil
         }
     }
     
-    func viewControllerAtIndex(_ index: Int) -> GreetingViewController? {
+    func viewController(at index: Int) -> GreetingViewController? {
         if (self.greetings.count == 0) || (index < 0) || (index >= self.greetings.count) {
             return nil
         }

        
        let choiceViewController = UIAlertController(title: "Scroll To...", message: nil, preferredStyle: UIAlertControllerStyle.actionSheet)
        
        let selectedIndex = self.indexOfViewController(self.pageViewController!.selectedViewController as! GreetingViewController)!
        
        for (index, viewControllerGreeting) in greetings.enumerated() {
            

            
                let action = UIAlertAction(title: viewControllerGreeting, style: UIAlertActionStyle.default, handler: { (alertAction) in
                    
                    let viewController = self.viewController(at: index)!
                    
                    let direction:EMPageViewControllerNavigationDirection = index > selectedIndex ? .forward : .reverse
                    
