                                         , clustering_sorted_orig
                                         , first_frame_above_threshold);
       std::cout << "     ... finished" << std::endl;
+
+//TODO: check: one lumping should be enough with new algorithm
       // compare prev_clustering to clustering_sorted:
       // if equal, end while
       microstates_lumped = (clustering_sorted_orig != clustering_sorted);
+
     } // end while (if microstates_lumped == false)
     // cleanup CUDA environment
     for (int i_gpu=0; i_gpu < n_gpus; ++i_gpu) {

    }
  }

  std::vector<unsigned int>
  lumped_clusters(std::vector<unsigned int> clustering
                , std::vector<unsigned int> ref_states

    // dynamic shared mem for ref coords
    extern __shared__ float smem_coords[];

//TODO shared mem for all comparisons N^2 + 2N to perform lumping
//     why size?: N^2 comparisons in compare block   j_1 - j_N
//              + N comparisons against prior match  j_N+1
//              + N for results                      j_N+2

//TODO rewrite

    // static shared mem for cluster ids
    __shared__ unsigned int smem_ref_states[BSIZE_SCR];
