     ;; other messages are processed by the normal pipeline, however here
     ;; we need to emit the state messages as well.
 
-    ;;          |     this not really true when
-    ;;          V     multiple threads running in same vm
-    (let [state @*store*
+    ;; this ugly stuff works because *store* is thread-local
+    (let [state (var-get *store*)
           [new-state rich-events] (pipeline state message)
           txlog     (kv/tx-log new-state)
           txlog-msg (tx-log->messages txlog)

    (println "\t" k " = " v ))
  (println "\t--------------------------------------------------------------------------"))





(def ^:dynamic *pipeline*     nil)
(def ^:dynamic *raw-pipeline* nil)
(def ^:dynamic *config*       nil)
(def           *store*        nil) ;; thread local only



