             
             CATransaction.begin()
             CATransaction.setDisableActions(true)
-            
-
-            
-            gradientShadLayer.startPoint  = startPoint;
-            gradientShadLayer.endPoint    = endPoint;
-            gradientShadLayer.startRadius = startRadius
-            gradientShadLayer.endRadius   = endRadius
+        
+            gradientLayer.startPoint  = startPoint;
+            gradientLayer.endPoint    = endPoint;
+            gradientLayer.startRadius = startRadius
+            gradientLayer.endRadius   = endRadius
             
             CATransaction.setDisableActions(false)
             CATransaction.commit();
             
-            gradientShadLayer.setNeedsDisplay()
-        }
-    }
-    
+            gradientLayer.setNeedsDisplay()
+        }
+    }
     
     func updateGardientLocationsString() {
         

    func updateGradientLayer()  {
        
        let axial = !typeGardientSwitch.isOn
        

        
        gradientShadLayer.gradientType       = axial ? .axial : .radial
        gradientShadLayer.extendsBeforeStart = extendsPastStart.isOn
        gradientShadLayer.extendsPastEnd     = extendsPastEnd.isOn
        gradientShadLayer.function           = typeFunctionSwitch.isOn ? .exponential : .linear;
        gradientShadLayer.slopeFunction      = self.slopeFunction[(self.tableView.indexPathForSelectedRow! as NSIndexPath).row] ;
        
        let endRadius:CGFloat   = CGFloat(endRadiusSlider.value)
        let startRadius:CGFloat = CGFloat(startRadiusSlider.value)

    @IBAction func maskTextSwitchChanged(_ sender: UISwitch) {
        
        if (sender.isOn) {
            gradientLayer.mask = textLayer
        } else {
            gradientLayer.mask = nil
            gradientLayer.addSublayer(textLayer)
        }
        updateGradientLayer()
    }
