       openEyeAnimation.toValue = _pathProvider.normalLeftEyePath
       
       animationGroup.animations = [closeEyeAnimation, openEyeAnimation]
+      
+      animationGroup.delegate = self
       _leftEyeLayer.addAnimation(animationGroup, forKey: "blinkLeftEye")
    }
    

      openEyeAnimation.toValue = _pathProvider.happyMouthPath
      
      animationGroup.animations = [closeEyeAnimation, openEyeAnimation]
      _mouthLayer.addAnimation(animationGroup, forKey: "growMouth")
   }
   

      _currentPriority = priority
      
      _performBlockWithoutAnimations { () -> Void in
         self._leftEyeLayer.hidden = priority == .Ages
         self._rightEyeLayer.hidden = priority == .Ages
         self._mouthLayer.hidden = false
         self._teethLayer.hidden = true
      }
      
      _performBlockWithoutAnimations { () -> Void in
         self._leftEyeLayer.removeAllAnimations()
         self._rightEyeLayer.removeAllAnimations()
         self._mouthLayer.removeAllAnimations()
         self._currentlyAnimating = false
      }
      
      _updateLayersForPriority(priority)
      animateForPriority(priority)
   }
   
   func animateForPriority(priority: TaskPriority)
   {
      if _currentlyAnimating == false {
         _currentlyAnimating = true
         switch priority
         {
         case .Ages:
            _animateHappyMouthGrow()
         case .Later:
            if Int.randRange(0, upper: 1) == 0 {
               _happyWinkEye()
            }
            else {
               _happySquint()
            }
         case .Soon:
            _surprise()
            _animateWorriedMouthShrink()
         case .ASAP:
            _angryBlink()
         case .Unknown:
            _currentlyAnimating = false
         }
      }
   }
   
