diff --git a/include/ALL_Histogram.hpp b/include/ALL_Histogram.hpp
index 7df46044f8b6669ea2ff84736b31d9e408ac4437..903891fb7d508d04273d9156409c1b46ca8b6c2e 100644
--- a/include/ALL_Histogram.hpp
+++ b/include/ALL_Histogram.hpp
@@ -320,18 +320,13 @@ template <class T, class W> void Histogram_LB<T, W>::balance(int step) {
 
   int current_slice = 0;
 
-  double work_sum = 0.0;
-
   // TODO: compute cumulative function - up to workAvgDimension work in each
   // box
   for (int idx = 0; idx < (int)work_collection.size(); ++idx) {
-    // work_new_dimension.at(current_slice) += work_collection.at(idx);
-    work_sum += work_collection.at(idx);
+    work_new_dimension.at(current_slice) += work_collection.at(idx);
     if (idx < (int)work_collection.size() - 1 &&
-        // work_new_dimension.at(current_slice) + work_collection.at(idx+1)
-        //    > workAvgDimension
-        work_sum + work_collection.at(idx + 1) >
-            (current_slice + 1) * workAvgDimension) {
+        work_new_dimension.at(current_slice) + work_collection.at(idx+1)
+           > workAvgDimension) {
       histogramSlices.at(current_slice) = idx;
       if (current_slice == (this->global_dims.at(i) - 1)) {
         histogramSlices.at(current_slice) = work_collection.size();