     (when (and (not (= "NO_CLASS" current-cluster))
                (> (cluster->size current-cluster @updated-state*)
                   (cluster->size biggest-neighbor @updated-state*)))
-      (swap! updated-state* assoc-in [::grid-cells (first grid-w-biggest-neighbor)]
-             (do
-               (log-it pos-idx ::move-neighoring-grid-to-current-cluster
-                       {:from biggest-neighbor
-                        :to   current-cluster})
-               (assoc (second grid-w-biggest-neighbor) ::cluster current-cluster))))))
+      (update-char-vec-in-state!
+        updated-state*
+        (first grid-w-biggest-neighbor)
+        (assoc
+          (second grid-w-biggest-neighbor)
+          ::cluster
+          current-cluster)))))
 
 (defn adjust-clustering [state t]
   (log-it [state t] ::adjust-clustering [{:t t}])

(defn- step-nine! [current-cluster updated-state* pos-idx biggest-neighbor char-vec]
  (if (= "NO_CLASS" current-cluster)
    ;;step 10
    (swap! updated-state* assoc-in [::grid-cells pos-idx]
           (do
             ;(log-it pos-idx ::move-grid-to-biggest-neighboring-cluster
             ;        biggest-neighbor)
             (assoc char-vec ::cluster biggest-neighbor)))
    (swap! updated-state* assoc-in [::grid-cells]
           (merge (::grid-cells @updated-state*)
                  (if (> (cluster->size current-cluster @updated-state*)

  (when (= ::sparse (::label char-vec))
    (let [old-cluster (::cluster char-vec)]
      ;(log-it pos-idx ::sparse-label {:cluster old-cluster})
      (update-char-vec-in-state! updated-state* pos-idx (assoc char-vec ::cluster "NO_CLASS"))
      (let [new-cluster (cluster->grid-cells old-cluster @updated-state*)]
        ;;step 6
        (when (and
