     }
     
     
-    override func popViewController(animated: Bool) -> UIViewController {
+    override func popViewController(animated: Bool) -> UIViewController? {
         if self.navigationController != nil {
-            return self.navigationController!.popViewController(animated: animated)!
+            return self.navigationController!.popViewController(animated: animated)
         }
-        return super.popViewController(animated: animated)!
+        return super.popViewController(animated: animated)
     }
     override func popToRootViewController(animated: Bool) -> [UIViewController]? {
         if self.navigationController != nil {
-            return self.navigationController!.popToRootViewController(animated: animated)!
+            return self.navigationController!.popToRootViewController(animated: animated)
         }
-        return super.popToRootViewController(animated: animated)!
+        return super.popToRootViewController(animated: animated)
     }
     
     override func popToViewController(_ viewController: UIViewController, animated: Bool) -> [UIViewController]? {
         if self.navigationController != nil {
-            return self.navigationController!.popToViewController(viewController, animated: animated)!
+            return self.navigationController!.popToViewController(viewController, animated: animated)
         }
-        return super.popToViewController(viewController, animated: animated)!
+        return super.popToViewController(viewController, animated: animated)
     }
     
     override func setViewControllers(_ viewControllers: [UIViewController], animated: Bool) {

        if self.navigationController != nil {
            return self.navigationController!.forUnwindSegueAction(action, from: self.parent!, withSender: sender)!
        }
//        return init(for: action, from: fromViewController, withSender: sender)
        return nil
    }
    
//    @available(iOS 9.0, *)
//    override func allowedChildViewControllersForUnwinding(from source: UIStoryboardUnwindSegueSource) -> [UIViewController] {
//        if self.navigationController != nil {
//            if #available(iOS 9.0, *) {
//                return self.navigationController!.allowedChildViewControllersForUnwinding(from: source)
//            } else {
//                // Fallback on earlier versions
//            }
//        }
//        if #available(iOS 9.0, *) {
//            return super.allowedChildViewControllersForUnwinding(from: source)
//        } else {
//            // Fallback on earlier versions
//        }
//    }
    
    override func pushViewController(_ viewController: UIViewController, animated: Bool) {
        if self.navigationController != nil {

        get {
            if self.navigationController != nil {
                return self.navigationController!.delegate
            } else {
               return super.delegate
            }
        }
