         let tailLayer = makeSegmentLayer(from: lastPoint, to: point, withColour: self.recordingColour ?? DEFAULT_RECORDING_COLOUR)
         
         // make a struct for the segment
-        let tailSegment = TailSegment(point: point, size: size, layer: tailLayer, timer: timer)
+        let tailSegment = TailSegment(point: point, moving: moving, size: size, layer: tailLayer, timer: timer)
         tailSegments.append(tailSegment) // add to storage
         layer.addSublayer(tailLayer) // draw the tail segment
     }

    /// Storage for a single tail segment which consists of a touch location and a timer for removing it.
    struct TailSegment {
        var point: CGPoint
        var size: CGFloat
        var layer: CALayer?
        var timer: Timer
    }
    
    /// Add animated tail segment that removes itself after a certain time.
    private func addTailSegment(at point: CGPoint, withSize size: CGFloat) {
        // make a timer to self destruct the segment.
        let timer = Timer.scheduledTimer(withTimeInterval: 0.3, repeats: false) { (timer) in
            self.removeOldestTailSegment() // remove the oldest segment

        
        // figure out last point, if no previous segment, just use same point.
        var lastPoint = point
        // make a line only when point is moving, and there was a previous point.
        if let seg = tailSegments.last, moving {
            lastPoint = seg.point
        }
        
