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

         (let [req-ch (cbfg.world.net/client-loop world (:net-connect-ch @prog-base)
                                                  server-addr server-port
                                                  client-addr (:res-ch @prog-base))]
           (prog-event #(assoc-in % [:prog-peers :clients client-addr]
                                  {:client-addr client-addr
                                   :server-addr server-addr
                                   :server-port server-port

                   [server-addr port listen-result-ch])
             (when-let [[accept-ch close-accept-ch] (atake server-init listen-result-ch)]
               (cbfg.world.net/server-accept-loop world accept-ch close-accept-ch)
               (prog-event :kv-server
                           #(update-in % [:prog-peers :servers server-addr]
                                       conj port)))))
         (reset! done true))
    (wait-done done)))
