         }
         
         if let session = self.captureSession, let photoOutput = self.photoOutput {
-            if !session.outputs.contains(where: { (photoOutput) -> Bool in
+            if session.canAddOutput(photoOutput) {
+                session.addOutput(photoOutput)
                 return true
-            }) {
-                if session.canAddOutput(photoOutput) {
-                    session.addOutput(photoOutput)
-                    return true
-                }
             }
         }
         print("NextLevel, couldn't add audio output to session")

        }

        if let session = self.captureSession, let videoOutput = self.videoOutput {
            if !session.outputs.contains(where: { (videoOutput) -> Bool in
                return true
            }) {
                if session.canAddOutput(videoOutput) {
                    session.addOutput(videoOutput)
                    return true
                }
            }
        }
        print("NextLevel, couldn't add video output to session")

        }
        
        if let session = self.captureSession, let audioOutput = self.audioOutput {
            if session.canAddOutput(audioOutput) {
                session.addOutput(audioOutput)
                return true
            }
        }
        print("NextLevel, couldn't add audio output to session")
