       {:class (if (@card-state :visible)
                 "card-value"
                 "card-value-hidden")}
-      (@card-state :symbol)]]))
+      (:symbol @card-state)]]))
 
 (defn home-page []
   [:div.pexeso

(defn generate-cards [] (mapv generate-card (generate-symbols)))

;couple of helpful predicate functions
(defn is-matched [card] (= (get @card :matched) true))
(defn is-visible [card] (= (get @card :visible) true))
(defn is-revealed [card] (is-visible card))

(defn revealed-cards-count [] (count (filter is-visible (@state :cards))))
(defn matched-cards-count [] (count (filter is-matched (@state :cards))))

; side effecting functions used for hiding/marking revealed cards
(defn hide-nonmatch! [] (mapv #(swap! % assoc :visible false) (@state :cards)) (swap! state assoc :last-symbol ""))
(defn mark-match! [symbol] (mapv
                             #(swap! % assoc :matched true)
                             (filterv #(= (get @% :symbol) symbol) (@state :cards))))

(defn reveal-card! [card-state] (swap! card-state assoc :visible true))
(defn start-game [] (swap! state assoc :cards (generate-cards)))


(defn init! []
  (hook-browser-navigation!)
  (mount-root))