         
       
         faceBoxes.append(faceBox)
-        
-
+
+    
         
         UIView.animate(withDuration: 0.5, delay: 0.0, options: .curveEaseInOut, animations: {
             faceBox.layer.borderColor = color
             faceBox.layer.opacity = 0.6
             faceBox.frame = frame
             
+         
+            
+        }, completion: { (success:Bool) in
             if (withAnimation) {
                 self.startFaceBoxScanAnimation(faceBox: faceBox)
             }
-            
-        }, completion: { (success:Bool) in
-            
         })
         
     }


        faceBox.addSubview(scanView)
        
        UIView.animate(withDuration: 2, delay: 0.0, options: .curveEaseInOut, animations: {
            scanView.layer.opacity = 1
            
            let endScanFrame = CGRect(x: 0, y: faceBox.frame.height - 10, width: faceBox.frame.width, height: 2)

            
        }, completion: { (success:Bool) in
            
            UIView.animate(withDuration: 0.5, delay: 0.0, options: .curveEaseInOut, animations: {
                scanView.layer.opacity = 0
                
                let endScanFrame = CGRect(x: 0, y: 10, width: faceBox.frame.width, height: 2)
