 
         uint2 vcf_db_range = ctx.snp_filter.active_vcf_ranges[read_index];
 
-
-
         // traverse the VCF range and mark corresponding read BPs as inactive
         for(uint32 feature = vcf_db_range.x; feature <= vcf_db_range.y; feature++)
         {

        : bqsr_lambda(ctx, batch)
    { }

private:
#if 0
    // xxxnsubtil: GATK doesn't actually test the read data, it only seems to look at the coordinates
    // test a VCF entry (identified by index in the db) against a read
    CUDA_HOST_DEVICE uint32 test_vcf(uint32 vcf_entry, const uint32 read_index, const uint32 read_bp_offset)
    {
        const BAM_CRQ_index& idx = batch.crq_index[read_index];
        const io::SNP_sequence_index& vcf_idx = ctx.db.ref_variant_index[vcf_entry];

        if (read_bp_offset + vcf_idx.variant_len > idx.read_len)
        {
            // if the variant ends past the end of the read, we can't test it
            return 0;
        }

        for(uint32 i = 0; i < vcf_idx.variant_len; i++)
        {
            if (batch.reads[idx.read_start + read_bp_offset + i] != ctx.db.variants[vcf_idx.variant_start + i])
            //if (batch.reads[idx.read_start + read_bp_offset + i] != ctx.db.reference_sequences[vcf_idx.reference_start + i])
                return 0;
        }

        return vcf_idx.variant_len;
    }
#endif

public:
    CUDA_HOST_DEVICE void operator() (const uint32 read_index)
    {

        vcf_range.x = vcf_start - db.reference_window_start.begin();
        vcf_range.y = vcf_range.x;

        // do a linear search to find the end of the VCF range
        // (there are generally very few VCF entries for an average read length --- and often none --- so this is expected to be faster than a binary search)
        while(vcf_range.y < db.reference_window_start.size() - 1 &&
