 #define MAX_ADJ_UNIONS_BINS 64
 namespace adj_unions {
     struct queue_info {
-        unsigned long long queue_sizes[MAX_ADJ_UNIONS_BINS] = {0,};
+        unsigned long long *d_queue_sizes;
         vid_t *d_edge_queue; // both balanced and imbalanced cases
-        unsigned long long queue_pos[MAX_ADJ_UNIONS_BINS+1] = {0,}; // prefix scan of counts
         unsigned long long *d_queue_pos;
     };
 


    timer::Timer<timer::DEVICE> TM(5);
    TM.start();
    //cudaMalloc(&(hd_queue_info().queue_sizes), (MAX_ADJ_UNIONS_BINS)*sizeof(unsigned long long));
    //cudaMemset(hd_queue_info().queue_sizes, 0, MAX_ADJ_UNIONS_BINS*sizeof(unsigned long long));
    cudaMalloc(&(hd_queue_info().d_edge_queue), 2*hornet.nE()*sizeof(vid_t));
    cudaMalloc(&(hd_queue_info().d_queue_pos), (MAX_ADJ_UNIONS_BINS+1)*sizeof(unsigned long long));
    //hd_queue_info().queue_pos = new unsigned long long[MAX_ADJ_UNIONS_BINS+1]();
    // figure out cutoffs/counts per bin
    if (vertex_pairs.size())
        forAllVertexPairs(hornet, vertex_pairs, bin_edges {hd_queue_info, true});

        forAllEdgeVertexPairs(hornet, bin_edges {hd_queue_info, true}, load_balancing);

    hd_queue_info.sync();
    // copy queue size info to from device to host
    cudaMemcpy(queue_sizes, hd_queue_info().d_queue_sizes, (MAX_ADJ_UNIONS_BINS)*sizeof(unsigned long long), cudaMemcpyDeviceToHost);
    /*
    for (auto i = 0; i < MAX_ADJ_UNIONS_BINS; i++)
        printf("queue=%d number of edges: %llu\n", i, hd_queue_info().queue_sizes[i]);
    */
    // compute prefix sum over bin counts
    //hd_queue_info().queue_pos[0] = 0;
    for (int i=1; i<MAX_ADJ_UNIONS_BINS+1; i++) {
        queue_pos[i] = queue_pos[i-1] + queue_sizes[i-1];
    }
    
    // transfer prefx results to device
    cudaMemcpy(hd_queue_info().d_queue_pos, queue_pos, (MAX_ADJ_UNIONS_BINS+1)*sizeof(unsigned long long), cudaMemcpyHostToDevice);
    /*
    for (auto i = 0; i < MAX_ADJ_UNIONS_BINS+1; i++)
        printf("queue=%d prefix sum: %llu\n", i, queue_pos[i]);
    */
    // bin edges
    if (vertex_pairs.size())
