 ; END can-update
 
 ; START pom-view
-(defn pom-view [{:keys [stime on] :as app} owner]
+(defn pom-view [{:keys [stime etime on] :as cursor} owner]
   (reify
     om/IDisplayName
     (display-name [_] "pom-view")

   :on false})

; START app-state
;; FIXME remove assoc
(def app-state (atom (assoc (default-state) :on true)))
; END app-state

; START format-time

    (will-mount [_]
      (js/setInterval
        (fn []
          (om/transact! cursor #(if (can-update %)
                               (assoc % :stime (+ 1e3 (:stime %)))
                               %)))
        10))

    om/IWillUpdate
    (will-update [_ {:keys [etime stime]} _]
      (when (<= (- etime stime) 0)
        (om/transact! on #(identity false))))

    om/IRender
    (render [_]
      (dom/div
        #js {:className "timer-body"}
        (om/build timer-top cursor)
        (om/build timer-middle cursor)
        (om/build timer-bottom cursor)))))
; END pom-view

(om/root pom-view app-state
