                 clockwise: true
             )
         case .square:
-            centerPath = UIBezierPath(
+            result = UIBezierPath(
                 rect: CGRect(
-                    origin: CGPoint.zero,
-                    size: CGSize(width: halfSideWidth - currentBorderLineWidth, height: halfSideWidth - currentBorderLineWidth)
+                    origin: CGPoint(x: currentBorderLineWidth, y: currentBorderLineWidth),
+                    size: CGSize(width: sideWidth - currentBorderLineWidth * 2.0, height: sideWidth - currentBorderLineWidth * 2.0)
                 )
             )
         }
+        return result
+    }
+    
+    private func updateLayers() {
+        borderShape.path = borderPath.cgPath
+        borderShape.fillColor = currentFillColor.cgColor
+        
         centerShape.path = centerPath.cgPath
         centerShape.fillColor = emptyFillColor.cgColor
     }

    
    private func startBorderLayerAnimation(animated: Bool) {
        if state == .empty {
            let finalPath = UIBezierPath(
                arcCenter: CGPoint(x: sideWidth / 2.0, y: sideWidth / 2.0),
                radius: sideWidth / 2.0 - currentBorderLineWidth,
                startAngle: 0.0,
                endAngle: doublePi,
                clockwise: true
                ).cgPath
            if animated {
                with(CABasicAnimation(keyPath: "path")) {
                    $0.fromValue = UIBezierPath(

                clockwise: true
            )
        case .square:
            result = UIBezierPath(
                rect: CGRect(
                    origin: CGPoint.zero,
                    size: CGSize(width: sideWidth, height: sideWidth)
                )
            )
        }
        return result
    }
    
    private var centerPath: UIBezierPath {
        let centerPoint = CGPoint(x: sideWidth / 2.0, y: sideWidth / 2.0)
        let halfSideWidth = sideWidth / 2.0
        let result: UIBezierPath
        switch form {
        case .circle:
            result = UIBezierPath(
                arcCenter: centerPoint,
                radius: sideWidth / 2.0 - currentBorderLineWidth,
                startAngle: 0.0,
