         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;
+    //hd_queue_info().queue_pos[0] = 0;
     for (int i=1; i<MAX_ADJ_UNIONS_BINS+1; i++) {
-        hd_queue_info().queue_pos[i] = hd_queue_info().queue_pos[i-1] + hd_queue_info().queue_sizes[i-1];
+        queue_pos[i] = queue_pos[i-1] + queue_sizes[i-1];
     }
     
     // transfer prefx results to device
-    cudaMemcpy(hd_queue_info().d_queue_pos, hd_queue_info().queue_pos, (MAX_ADJ_UNIONS_BINS+1)*sizeof(unsigned long long), cudaMemcpyHostToDevice);
+    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, hd_queue_info().queue_pos[i]);
+        printf("queue=%d prefix sum: %llu\n", i, queue_pos[i]);
     */
     // bin edges
     if (vertex_pairs.size())

    for (auto log_factor=0; log_factor <= LOG_MAX; log_factor += 1) {
        threads_per = 1 << log_factor; 
        bin_index = ((log_factor == LOG_MAX) || (bin_index > bin_max)) ? bin_max : bin_offset + (log_factor+2)+1;
        end_index = hd_queue_info().queue_pos[bin_index];
        size = end_index - start_index;
        printf("threads_per: %d, size: %llu\n", threads_per, size); 
        if (size) {

    }
    // imbalanced phase
    bin_offset = bin_max;
    start_index = queue_pos[bin_max];
    bin_max *= 2; 
    for (auto log_factor=0; log_factor <= LOG_MAX; log_factor += 1) {
        threads_per = 1 << log_factor; 
        bin_index = ((log_factor == LOG_MAX) || (bin_index > bin_max)) ? bin_max : bin_offset + (log_factor+2)+1;
        end_index = queue_pos[bin_index];
        size = end_index - start_index;
        printf("threads_per: %d, size: %llu\n", threads_per, size); 
        if (size) {
