         let graphStartPoint = CGPoint(x: margin, y: highestYPoint)
         let graphEndPoint = CGPoint(x: margin, y: bounds.height)
         
-        context?.drawLinearGradient(gradient!, start: graphStartPoint, end: graphEndPoint, options: [])
-        context?.restoreGState()
+        context.drawLinearGradient(gradient!, start: graphStartPoint, end: graphEndPoint, options: [])
+        context.restoreGState()
         
         //draw the line on top of the clipped gradient
         graphPath.lineWidth = 2.0

        
        //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

        
        //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
