   (fn [[active sigs colls] v]
     (let [active (conj active v)]
       (if (< (rand) 0.5)
-        (if (should-signal? v s-thresh)
+        (if (> (score-signal v) s-thresh)
           (let [vsigs (signal! v sync-vertex-signal)]
             [(into active vsigs) (+ sigs (count vsigs)) colls])
           [active sigs colls])
-        (if (should-collect? v c-thresh)
+        (if (> (score-collect v) c-thresh)
           (do (collect! v)
-              (if (should-signal? v s-thresh)
+              (if (> (score-signal v) s-thresh)
                 (let [vsigs (signal! v sync-vertex-signal)]
                   [(into active vsigs) (+ sigs (count vsigs)) (inc colls)])
                 [active sigs (inc colls)]))

  "Computes vertex collect score, here simply the number
  of ::uncollected signal values."
  [vertex] (-> vertex :state deref ::uncollected count))

(defn should-signal?
  [vertex thresh] (> (score-signal vertex) thresh))

(defn should-collect?
  [vertex thresh] (> (score-collect vertex) thresh))

(defn sync-vertex-signal
  [vertex]

    (loop [sigs 0, verts vertices]
      (if verts
        (let [v (first verts)]
          (if (> (score-signal v) thresh)
            (do (debug (:id v) "signaling")
                (recur (long (+ sigs (count (signal! v sync-vertex-signal)))) (next verts)))
            (recur sigs (next verts))))
