         self.delegate?.swiftyPageController(self, willMoveToController: viewControllers[index])
         let newController = viewControllers[index]
         let direction: AnimationDirection = index - selectedIndex! > 0 ? .left : .right
-//        transition(fromController: self.viewControllers[selectedIndex!], toController: newController, animationDirection: direction)
         interactiveTransition(fromController: self.viewControllers[selectedIndex!], toController: newController, animationDirection: direction) // new
     }
     

        if fromController == toController {
            return
        }
        isAnimating = true
        
        // setup frame
        toController.view.frame = containerView.bounds
        containerView.addSubview(toController.view) // new line
        
        setupContentInsets(in: toController)
        
        // setup animation

        }
    }
    
    fileprivate func transitionToIndex(index: Int) {
        if !isViewLoaded {
            return
