   "Takes an event in json format which contain an Tx-Log entry and
    it pushes the change to the running *kv-store*"
   [^String event]
-  (swap! *store*
-         (fn [store]
-           (->> event
-                from-json
-                vector
-                (kv/restore store)))))
+  ;; this ugly stuff works because *store* is thread-local
+  (var-set *store*
+         (->> event
+              from-json
+              vector
+              (kv/restore *store*))))
 
 
 

    (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



