             //int16_t ls = __shfl_sync(0xffffffff, score3, 31);
             if (thread_idx == 31)
             {
-                first_element_prev_score[0] = score3;
-                //first_element_prev_score[1] = score3;
+                first_element_prev_score = score3;
             }
 
             //if (thread_idx == 0)

        //int32_t* scores_i = &scores[i * CUDAPOA_MAX_MATRIX_DIMENSION];

        //int16_t first_element_prev_score = scores[i * CUDAPOA_MAX_SEQUENCE_SIZE];
        if (thread_idx == 0 || thread_idx == 32)
        {
            first_element_prev_score[thread_idx / 32] = scores[i * CUDAPOA_MAX_SEQUENCE_SIZE];
        }
        uint16_t out_edge_count = outgoing_edge_count_global[node_id];


                    loop = false;
                    // The shfl_up lets us grab a value from the lane below.
                    //printf("thread %d line %d\n", thread_idx, __LINE__);
                    last_score = __shfl_up_sync(0xffffffff << 1, score3, 1);
                    if (thread_idx == 32)
                    {
                        last_score = first_element_prev_score;
                    }
                    __syncwarp();

