             }
         }
         print("FACE",faces)
+        
         if (faces.count>0){
             dispatch_async(dispatch_get_main_queue(), {() -> Void in
                 CATransaction.begin()

        for metadataObject in metadataObjects as! [AVMetadataObject] {
            if metadataObject.type == AVMetadataObjectTypeFace {
                if let faceObject = metadataObject as? AVMetadataFaceObject {
                    
                    let transformedMetadataObject = previewLayer.transformedMetadataObjectForMetadataObject(metadataObject)
                    let face:(id: Int, frame: CGRect) = (faceObject.faceID, transformedMetadataObject.bounds)
                    faces.append(face)

    
    private var currentCameraDevice:AVCaptureDevice?
    
    private var sessionQueue:dispatch_queue_t = dispatch_queue_create("com.yourtion.SwiftFaceDetection.session_access_queue", DISPATCH_QUEUE_SERIAL)
    
    private var session:AVCaptureSession!
    private var backCameraDevice:AVCaptureDevice?
