     (will-mount [_]
       (js/setInterval
        (fn []
-         (when (get-in @app [:hero :jump-time])
+         (when (get-in @app [:hero :jump])
            (let [height (gravity app)]
              (when (= height 70)
-               (om/update! app [:hero :jump-time] nil))
+               (om/update! app [:hero :jump] false))
              (om/update! app [:hero :position :bottom] height)
              ))
-
-
-
+         (when (= :left (get-in @app [:hero :move]))
+           (om/transact! app [:hero :position :left] (fn [old] (+ old 5))))
+         (when (= :right (get-in @app [:hero :move]))
+           (om/transact! app [:hero :position :left] (fn [old] (- old 5))))
          ) (/ 1000 60)))
     om/IRenderState
     (render-state [this state]

  (.log js/console obj))

(def app-state (atom {:text "Hello Chestnut!"
                      :hero {
                             :position {:bottom 211 :left 209}
                             :jump-time nil
                             }

                      :grid [[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]


(defn gravity [app]
  (let [dy (get-in @app [:hero :position :bottom])
        t (get-in @app [:hero :jump])
        dt (/ (- (.getTime (js/Date.)) t) 1000)
        vforce (* v dt)
        gforce (/ (* g dt dt) 2)
