     
     weak var bgLayer: CAShapeLayer?
     weak var fgLayer: CAShapeLayer?
-    
     var pathAnimation: CABasicAnimation!
     
+    private var duration: CFTimeInterval = 3.0
+    private var startPos: CGFloat = 0.0
+    private var endPos: CGFloat = 1.0
+    private var reverses = true
+    private var repeatCount: CGFloat = 5.0
+    private var lineWidth: CGFloat?
+
     override init(frame: CGRect) {
         super.init(frame: frame)
         
     }
     
-    public convenience init(mystic: CGFloat) {
+    public convenience init(mystic: CGFloat, duration: CFTimeInterval, lineWidth: CGFloat?) {
         self.init(frame: CGRectZero)
-        self.alpha = 0
         self.mystic = mystic
-        self.md = CGFloat(mystic * mystic)
-        self.strokeRatio = CGFloat(md) / CGFloat(mystic)
-        self.userInteractionEnabled = false
-        addBackground()
-        setupAnimation()
+        self.duration = duration
+        self.repeatCount = 1
+        self.reverses = false
+        setup()
+    }
+    
+    public convenience init(mystic: CGFloat, lineWidth: CGFloat?) {
+        self.init(frame: CGRectZero)
+        self.mystic = mystic
+        setup()
     }
     
     required public init(coder aDecoder: NSCoder) {

                path.addLineToPoint(curr)
                last  = curr
            }
            /*
            var pathRect = path.bounds
            var pos = CGAffineTransformMakeTranslation(abs(path.bounds.origin.x), abs(path.bounds.origin.y))
            path.applyTransform(pos)
            */
            
            return path
        }
    }

    func setupAnimation() {
        if fgLayer == nil {
            
            fgLayer = shapeLayerWithLogoPath(UIColor(red: 1, green: 246/255, blue: 153/255, alpha: 1), lineJoin: kCALineJoinMiter)
            self.layer.addSublayer(fgLayer)
        }
        pathAnimation = CABasicAnimation(keyPath: "strokeEnd")
