                       :text-align "center"
                       :font-weight "bold"}}
                       (if (number? (read-string @state))
-                          (str (calc-weight @state 45 pound-plates)) ;;(str (to-pounds @state))
+                          (str (calc-weight @state 
+                                            (if (zero? @desired-units) 20 45) 
+                                            (if (zero? @desired-units) kilogram-plates pound-plates))) ;;(str (to-pounds @state))
                           (str "Not a number" @state (rand 10));;
                           )]])))
 


;; Calculates the number of each disc required to reach a given weight.
(defn baz [accum plate-weights remaining-weight]
  (println accum plate-weights remaining-weight)
  (if (or (<= remaining-weight 0) 
          (empty? plate-weights))
    accum


(defn app-root []
  (let [greeting (subscribe [:get-greeting])
        state (atom "")
        desired-units (atom 0)]
    (fn []
      [view {:style {:flex-direction "column"
                     :margin 40}}
