 
                         if (insert_point < max_queue_size)
                             {
-                            s_queue_gid[insert_point] = group;
+                            s_queue_didx_narrow[insert_point] = i_dep_queue;
                             s_queue_j[insert_point] = (j << 1) | (old ? 1 : 0);
                             }
                         else

            __syncthreads();
            if (master && group == 0)
                s_queue_size = 0;
            if (active && (k>>1) < excell_size)
                atomicAdd(&s_still_searching, 1);
            __syncthreads();

            } // end while (s_still_searching)

        // do we still need to process depletants?


        __syncthreads();

        // actual size of queue
        unsigned int depletant_queue_size = min(s_depletant_queue_size, max_depletant_queue_size);

        // starting offset in depletant queue for this thread
        unsigned int q = group;

        // counters to track progress through the loop over potential neighbors
        unsigned int excell_size = d_excell_size[my_cell];
        unsigned int k = offset;

        if (master)
            overlap_checks += 2*excell_size;

        // loop while still searching
        while (s_still_searching)
