         //draw the gradient
         let startPoint = CGPoint.zero
         let endPoint = CGPoint(x:0, y: bounds.height)
-        context?.drawLinearGradient(gradient!, start: startPoint, end: endPoint, options: [])
+        context.drawLinearGradient(gradient!, start: startPoint, end: endPoint, options: [])
         
         //calculate the x point
         let margin = Constants.margin

        
        //Create the clipping path for the graph gradient
        //save state of the context
        context?.saveGState()
        
        //make a copy of the path
        let clippingPath = graphPath.copy() as! UIBezierPath

        
        //obtain current context
        //CG drawing methods need a context in order to draw
        let context = UIGraphicsGetCurrentContext()!
        let colors = [startColor.cgColor, endColor.cgColor]
        
        //all contexts have a color space
