   (f/collect-pure
    (fn [val incoming]
      (debug :update-index spo incoming)
-     (transduce
-      (map (fn [[op id t]] [op id (nth t spo)]))
-      (completing
-       (fn [acc [op id x]]
-         (case op
-           :add    (update acc x (fnil conj #{}) id)
-           :remove (if-let [idx (acc x)]
-                     (if (= #{id} idx)
-                       (dissoc acc x)
-                       (update acc x disj id))
-                     acc)
-           (do (warn "ignoring unknown index signal op:" op)
-               acc))))
-      val incoming))))
+     (debug :old-index val)
+     (let [val (transduce
+                (map (fn [[op id t]] [op id (nth t spo)]))
+                (completing
+                 (fn [acc [op id x]]
+                   (case op
+                     :add    (update acc x (fnil conj #{}) id)
+                     :remove (if-let [idx (acc x)]
+                               (if (= #{id} idx)
+                                 (dissoc acc x)
+                                 (update acc x disj id))
+                               acc)
+                     (do (warn "ignoring unknown index signal op:" op)
+                         acc))))
+                val incoming)]
+       (debug :new-index val)
+       val))))
 
 (defn signal-index-select
   [vertex [idx sel]]

    (warn @pq)
    (warn @jq)
    (warn @tq)
    {:g        g
     :ctx      ctx
     :all      all

    (assoc q-spec :qvar-result resv)))

(defn score-collect-join
  [vertex]
  (let [state @(:state vertex)]
    (if (and (seq (::f/uncollected state)) (== (count (::f/signal-map @(:state vertex))) 2)) 1 0)))

(defn add-join!
  [g qa qb]
