             case cigar_op::OP_S:
                 for(uint32 i = 0; i < cigar[c].len; i++)
                 {
-                    // if we're in a clipping region, then we're either in the leading or trailing clipping region
-                    trailing_clips = !leading_clips;
-
                     *output_read_index++ = read_index;
                     *output_read_coordinates++ = read_offset;
                     *output_reference_coordinates++ = uint16(-1);
 
-                    // if we haven't reached the trailing clipping region yet...
-                    if (!trailing_clips)
-                    {
-                        // ... then update the end of the read windows
-                        update(read_window_clipped, read_offset, false, true);
-                        update(read_window_clipped_no_insertions, read_offset, false, true);
-                    }
-
                     read_offset++;
                 }
 

                    *output_read_coordinates++ = uint16(-1);
                    *output_reference_coordinates++ = reference_offset;

                    update(reference_window_clipped, reference_offset);

                    reference_offset++;
                }
            }
        }

        ctx.cigar.read_window_clipped[read_index] = read_window_clipped;
        ctx.cigar.read_window_clipped_no_insertions[read_index] = read_window_clipped_no_insertions;
        ctx.cigar.reference_window_clipped[read_index] = reference_window_clipped;
    }
};


            case cigar_op::OP_I:
                for(uint32 i = 0; i < cigar[c].len; i++)
                {
                    *output_read_index++ = read_index;
                    *output_read_coordinates++ = read_offset;
                    *output_reference_coordinates++ = uint16(-1);

                    read_offset++;
                }
