 
         let coordinate: Array<CGFloat> = [toPoint.x, toPoint.y]
         lineCoordinates.append(coordinate)
-        print(lineCoordinates)
 
         CGContextSetLineCap(context, CGLineCap.Round)
         CGContextSetLineWidth(context, brushWidth)

    }

    func drawMidpoint() {
        print("Drawing")

        var totalX: CGFloat = 0
        var totalY: CGFloat = 0


        let midpointY = totalY / CGFloat(lineCoordinates.count)

        drawCircle(midpointX, y: midpointY)
    }

    func drawCircle(x: CGFloat, y: CGFloat) {
