                     guard anim.duration == animationGroup.duration else { fatalError("All animations in an animation group must have the same duration.") }
                     
                     let keyframeAnimation = getKeyframeAnimation(anim)
-                    keyframeAnimation.duration = anim.duration
-                    keyframeAnimation.fillMode = kCAFillModeForwards
-                    keyframeAnimation.removedOnCompletion = false
-                    keyframeAnimation.values = getValues(updatedValues[anim.property], animation: anim)
-                    
-                    updatedValues[anim.property] = anim.endValue
+                    keyframeAnimation.values = getValues(updatedValues, animation: anim)
                     
                     groupedAnimations.append(keyframeAnimation)
+
+                    updateValues(updatedValues, animation: anim)
                 }
                 
                 animationGroup.animations = groupedAnimations
                 
-                totalDuration += animationGroup.duration
+                totalDuration = animationGroup.beginTime + animationGroup.duration
                 chainedAnims.append(animationGroup)
             }
         }

    case ShadowColor
    case ShadowOffset
    case ShadowOpacity
//    case ShadowPath
    case ShadowRadius
    
    case Transform
    
    case ScaleX
    case ScaleY
    case ScaleZ
    case Scale
    
    case RotationX
    case RotationY
    case RotationZ
    case Rotation
    
    case TranslationX
    case TranslationY
    case TranslationZ

//
//  AnimationDescriptor.swift
//  KRAnimation
//
//  Created by Joshua Park on 6/17/16.
