   :initialise-db                  ;; event id being handled
   check-schema                    ;; middleware
   (fn  [_ _]                      ;; the handler
-    default-value))               ;; all hail the new state
+    (merge default-value
+           (get-local-storage))))    ;; all hail the new state
 
 
-(register-pure-handler            ;; disptached to when user changes the bottom filter
+(register-pure-handler            ;; handlers changes the footer filter
   :set-showing                    ;; event-id
   [check-schema debug trim-v]     ;; middleware  (wraps the handler)
   (fn                             ;; handler

    (assoc db :showing filter-kw)))


(register-pure-handler             ;; given only the text, create a new todo
  :add-todo
  todo-middleware                  ;; only 'todo' part of db provided
  (fn [todos [text]]
    (let [id  (next-id todos)]
      (assoc todos id {:id id :title text :done false}))))


  :complete-all-toggle
  todo-middleware
  (fn [todos]
    (let [val (not-every? :done (vals todos))]   ;; toggle true or false?
      (reduce #(assoc-in %1 [%2 :done] val)
              todos
              (keys todos)))))
