             case cigar_op::OP_X:
                 for(uint32 i = 0; i < cigar[c].len; i++)
                 {
-                    leading_clips = false;
-
                     *output_read_index++ = read_index;
                     *output_read_coordinates++ = read_offset;
                     *output_reference_coordinates++ = reference_offset;
 
-                    update(read_window_clipped, read_offset);
-                    update(read_window_clipped_no_insertions, read_offset);
-                    update(reference_window_clipped, reference_offset);
-
                     read_offset++;
                     reference_offset++;
                 }

    }
};

// expand cigar coordinates for a read
// xxxnsubtil: this is very similar to compute_alignment_window, should merge
struct cigar_coordinates_expand : public bqsr_lambda
{
    cigar_coordinates_expand(bqsr_context::view ctx,
                             const alignment_batch_device::const_view batch)
        : bqsr_lambda(ctx, batch)
    { }

    // update a coordinate window when we reach a new valid offset for the window
    template<typename W, typename O>
    CUDA_HOST_DEVICE void update(W& window, O new_offset,
                                 bool update_start = true,
                                 bool update_end = true)
    {
        if (update_start)
            window.x = bqsr::min(window.x, new_offset);

        if (update_end)
            window.y = bqsr::max(window.y, new_offset);
    }

    CUDA_HOST_DEVICE void operator() (const uint32 read_index)
    {

                     context->active_read_list.end(),
                     cigar_coordinates_expand(*context, batch.device));

    // initialize read windows
    thrust::for_each(context->active_read_list.begin(),
                     context->active_read_list.end(),
                     read_window_init(*context, batch.device));

    // apply read clips
    // hard-clip the soft clip regions
    thrust::for_each(context->active_read_list.begin(),
                     context->active_read_list.end(),
                     remove_soft_clips(*context, batch.device));

    // compute the no insertions window based on the clipping window
    thrust::for_each(context->active_read_list.begin(),
                     context->active_read_list.end(),
                     compute_no_insertions_window(*context, batch.device));

    // finally, compute the reference window (using the no insertions window)
    thrust::for_each(context->active_read_list.begin(),
                     context->active_read_list.end(),
                     compute_reference_window(*context, batch.device));

    // compute the error bit vectors
    // this also counts the number of errors in each read
    thrust::for_each(context->active_read_list.begin(),
