     let presentInteraction = SidebarPresentInteraction()
     let dismissInteraction = SidebarDismissInteraction()
     
-    var snapshotViewForDismissedController:UIView = UIView()
-    var peekGapForDismissedController:CGFloat = 40
+    var dismissedControllerView:UIView? = nil
+    var peekViewForDismissedController = UIView()
+    var constraintForPeekView:NSLayoutConstraint!
+    var gapForPeekView:CGFloat = 40
+    
     var presentAnimationDuration:NSTimeInterval = 0.5
     var dismissAnimationDuration:NSTimeInterval = 0.5
     

        // we link the inherited controller to make changes on the view and other values any time
        self.presentAnimation.MainController = self
        self.dismissAnimation.MainController = self
    }
    override func presentViewController(viewControllerToPresent: UIViewController, animated: Bool, completion: (() -> Void)?) {
        // delegate the present animation of the new controller to sidebarcontroller

        
        // call the present method from super
        super.presentViewController(viewControllerToPresent, animated: animated, completion: completion)
    }
    override func viewWillTransitionToSize(size: CGSize, withTransitionCoordinator coordinator: UIViewControllerTransitionCoordinator) {
        super.viewWillTransitionToSize(size, withTransitionCoordinator: coordinator)
        constraintForPeekView.constant = 0
        self.view.updateConstraints()
    }
    func animationControllerForPresentedController(presented: UIViewController, presentingController presenting: UIViewController, sourceController source: UIViewController) -> UIViewControllerAnimatedTransitioning? {
        // set the animation for the presented transition
