     (str mm ":" ss ":" ms)))
 
 (defn keep-time [func]
+"Starts appropriate timer (break or work) and checks if timer is 0"
   (if (zero? @break-timer)
     (do
-      (reset)
-      
-      (start)))
-  (if (zero? @start-timer)
-    (do
-      (reset! break-time? 1)
-      (swap! break-timer func))
-    (do
-      (reset! break-time? 0)
-      
-      (swap! start-timer func))))
+      (reset)     
+      (start))
+    (if (zero? @work-timer)
+      (do
+        (reset! break-time? true)
+        (swap! break-timer func))
+      (do
+        (reset! break-time? false)
+        (swap! work-timer func)))))
 
 (defn pause []
-  (when (time-active?)
-    (reset! time-active 0)
+"if timer is running stop it"
+  (when @time-active?
+    (reset! time-active? true)
     (js/clearInterval @interval)))
 
 (defn start []
-  (reset! time-active 1)
+"if no timer is running, start it"
+  (reset! time-active? true)
   (reset! interval (js/setInterval #(keep-time @time-fn) 10)))
 
-(defn reset []
+(defn reset [] ;todo - reset only break timer when in break time
+"set the work and break timers and stop any running"
   (let [starting (fn [n] ;; cap input at 59 mins
                    (if (< n 60)
                      n
                      59))]
-    (reset! break-time? 0)
-    (reset! time-active 0)
+    (reset! break-time? false)
+    (reset! time-active? false)
     (js/clearInterval @interval)
-    (reset! start-timer (* 60 (* 100 (starting  @start-time))))
+    (reset! work-timer (* 60 (* 100 (starting  @work-time))))
     (reset! break-timer (* 60 (* 100 @break-time)))))
 
 (defn start-time-input []
   [:div.start-input
    "Set working timer (in minutes): "
    [:input {:type "text"
-            :value @start-time
-            :on-change #(reset! start-time (-> % .-target .-value))}]
+            :value @work-time
+            :on-change #(reset! work-time (-> % .-target .-value))}]
    [:button {:on-click (fn [ev] (reset))} "Set!"]])
 
 (defn break-time-input []


(defonce interval (atom 0))

(def time-active (r/atom 0)) ;doesnt work as boolean? not sure why..

(def start-timer (r/atom 150000))

(def break-timer (r/atom 1500))

(def start-time (r/atom 25))

(def break-time (r/atom 5))

(def time-fn (atom dec))

(def break-time? (r/atom 0))

(defn time-active? []
  (if (= @time-active 0)
    false
    true))

(defn seconds-to-time [secs]
  (let [d (js/Date. (* 10 secs))]


(defn work-clock []
  [:div
   [:h1 (when @time-active?
          (if @break-time?            
            "Break time!!"
            "Get to work!!")) ]
   [start-time-input]
   [break-time-input]
   [:h1.work-clock  {:class (if @break-time?
                              "hide"
                              "show-work"                              
                              )} (display-time (seconds-to-time @work-timer))]
   [:h1.break-clock {:class (if @break-time?                              
                              (if (< @break-timer 3000)
                                "show-break warning"
                                "show-break")
                              "hide"
                              )} (display-time (seconds-to-time @break-timer))]
   [:button {:on-click (fn [ev] (start))} "Start!"]
   [:button {:on-click (fn [ev] (pause))} "Pause!"]
