         // setup frame
         controller.view.frame = containerView.bounds
         
+        // setup insets
         setupContentInsets(in: controller)
         
-        self.delegate?.swiftyPageController(self, willMoveToController: controller)
-        
+        // call delegate 'willMoveToController' method
+        delegate?.swiftyPageController(self, willMoveToController: controller)
+        
+        // show controller
         containerView.addSubview(controller.view)
         controller.didMove(toParentViewController: self)
         
+        // call delegate 'didMoveToController' methode
         self.delegate?.swiftyPageController(self, didMoveToController: controller)
     }
     

            // change selectedIndex
            selectedIndex = viewControllers.index(of: toController)!
            
            toController.view.layer.removeAnimation(forKey: "to.controller.animation.position.x")
            fromController.view.layer.removeAnimation(forKey: "from.controller.animation.position.x")
            
            isAnimating = false
            toControllerInteractive = nil
            fromControllerInteractive = nil
            
            // logic for transition between child view controllers
            if let nextIndex = self.nextIndex {
                if self.viewControllers[nextIndex] == toController {
                    self.nextIndex = nil
                } else {
                    self.transitionToIndex(index: nextIndex)
                }
            }
        }
    }
    
    fileprivate func startTimerForInteractiveTransition() {
        let timeInterval = 0.001
        timerForInteractiveTransition = Timer.scheduledTimer(timeInterval: timeInterval, target: self, selector: #selector(finishAnimationTransition), userInfo: nil, repeats: true)
    }

        animationPositionToController.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseOut)
        
        toController.view.layer.speed = panGesture.state != .changed ? kAnimation : 0.0
        toController.view.layer.add(animationPositionToController, forKey: toControllerAnimationIdentifier)
        
        let animationPositionFromController = animationPositionToController
        animationPositionFromController.fromValue = fromController.view.layer.position.x
