 ; --------------------------------------------
 
 (defn prog-event [label f]
-  (swap! prog-history #(let [ph (f %)]
-                         (update-in ph [:prog-events]
-                                    conj [(count (:prog-events ph))
-                                          label
-                                          {:prog-peers (:prog-peers ph)}]))))
+  (let [pc (swap! prog-curr f)]
+    (swap! prog-history #(conj % [(count %) label pc]))))
 
 (defn kv-server [server-addr & ports]
   (let [world (:world @prog-base)

                                                  server-addr server-port
                                                  client-addr (:res-ch @prog-base))]
           (prog-event [:kv-client client-addr server-addr server-port]
                       #(assoc-in % [:prog-peers :clients client-addr]
                                  {:client-addr client-addr
                                   :server-addr server-addr
                                   :server-port server-port

          (act-loop cmd-dispatch-loop world [num-dispatches 0]
                    (when-let [msg (atake cmd-dispatch-loop req-ch)]
                      (when-let [client-req-ch
                                 (get-in @prog-curr [:clients (:client msg) :req-ch])]
                        (aput cmd-dispatch-loop client-req-ch msg))
                      (recur (inc num-dispatches))))
          (println :prog-res prog-res)
