                 
                 drawQuadCurve(previousEndPoint, control: previousPoint, end: midPoint, startWidth:previousWidth, endWidth: currentWidth)
                 
-                signature = UIGraphicsGetImageFromCurrentImageContext()
+                _signature = UIGraphicsGetImageFromCurrentImageContext()
                 UIGraphicsEndImageContext()
                 previousPoint = currentPoint
                 previousEndPoint = midPoint

    }
    
    override open func draw(_ rect: CGRect) {
        signature?.draw(in: rect)
    }
    
    fileprivate func getOffsetPoints(p0:CGPoint, p1:CGPoint, width:CGFloat) -> (p0:CGPoint, p1:CGPoint) {

        let rect = self.bounds
        
        UIGraphicsBeginImageContextWithOptions(rect.size, false, UIScreen.main.scale)
        if(_signature == nil) {
            _signature = UIGraphicsGetImageFromCurrentImageContext()
        }
        _signature?.draw(in: rect)
        let currentPoint = tap.location(in: self)
        drawPointAt(currentPoint, pointSize: 5.0)
        _signature = UIGraphicsGetImageFromCurrentImageContext()
        UIGraphicsEndImageContext()
        self.setNeedsDisplay()

