                 ani.fillMode = kCAFillModeBoth
                 loopLayer.add(ani, forKey: "opacity")
             case "spin":
-                let fClockwise = booleanValueFrom(animation, key: "clockwise", defaultValue: true)
+                let fClockwise = booleanValue(from: animation, key: "clockwise", defaultValue: true)
                 let degree = (fClockwise ? 120 : -120) * CGFloat(M_PI / 180.0)
                 let ani = CAKeyframeAnimation(keyPath: "transform")
                 ani.values = [NSValue(caTransform3D:loopLayer.transform),

        }
    }
    
    private func valueFrom(_ info:[String:Any], key:String, defaultValue:CGFloat) -> CGFloat {
        if let value = info[key] as? CGFloat {
            return value
        }
        return defaultValue
    }

    private func booleanValueFrom(_ info:[String:Any], key:String, defaultValue:Bool) -> Bool {
        if let value = info[key] as? Bool {
            return value
        }

                ani.fillMode = kCAFillModeBoth
                loopLayer.add(ani, forKey: "transform")
            case "wiggle":
                let delta = value(from: animation, key: "delta", defaultValue: 15) * CGFloat(M_PI / 180.0)
                let ani = CAKeyframeAnimation(keyPath: "transform")
                ani.values = [NSValue(caTransform3D:loopLayer.transform),
                              NSValue(caTransform3D:CATransform3DConcat(CATransform3DMakeRotation(delta, 0.0, 0.0, 1.0), loopLayer.transform)),
