         let verticalMiddle = (imageSize.height * format.scale) / 2
         for (x, sample) in samples.enumerated() {
             let height = (sample - min) * sampleDrawingScale
-            context.move(to: CGPoint(x: CGFloat(x), y: (verticalMiddle - height)))
-            context.addLine(to: CGPoint(x: CGFloat(x), y: (verticalMiddle + height)))
-
+            context.move(to: CGPoint(x: CGFloat(x), y: verticalMiddle - height))
+            context.addLine(to: CGPoint(x: CGFloat(x), y: verticalMiddle + height))
             context.strokePath();
         }
         guard let image = UIGraphicsGetImageFromCurrentImageContext() else {

                           samplesToProcess: samplesToProcess,
                           downSampledLength: downSampledLength,
                           samplesPerPixel: samplesPerPixel,
                           filter2: filter)
        }
        
        // Process the remaining samples at the end which didn't fit into samplesPerPixel

        }
    }
    
    func processSamples(fromData sampleBuffer: inout Data, sampleMax: inout CGFloat, outputSamples: inout [CGFloat], samplesToProcess: Int, downSampledLength: Int, samplesPerPixel: Int, filter: [Float]) {
        sampleBuffer.withUnsafeBytes { (samples: UnsafePointer<Int16>) in
            var processingBuffer = [Float](repeating: 0.0, count: samplesToProcess)
            
