 
 (defn choose-word [user-history]
   (let [choice (serve-words-rand)]
-    (if (contains? user-history choice) (choose-word user-history) choice)))
+    (if (contains? user-history choice)
+      (choose-word user-history)
+      choice)))
 
 (defn set-new-word [db _]
   (let [

        [:strong "Important: "]
        "Set the division with a dash '-': 'игорь' -> 'и-горь'. There will be 10 words to divide."
        [:div.input-group.col-sm-4
         [:input.form-control {:value @current-word, :on-change #(re-frame/dispatch [:set-current-word (-> % .-target .-value)])}]
         [:div.input-group-btn
          [:button.btn.btn-default
           {:on-click #(re-frame/dispatch [:next-word])} (if (-> (count @user-history) (= how-many)) "Result" "Next")]]]
        [:ul.list-group
         {:style {:margin-top "10px"}}
         (for [[k v] @user-history]
           [:li.list-group-item {:key k} (str k " -> " v)])]]
       [:table.table
        [:tr
         (for [{:keys [short]} models] [:th {:key short}  short])] [:tr (for [v @result] [:td {:key (rand)} v])]]


(defn end-or-continue [db how-many how-many-guessed]
  (if (>= how-many-guessed how-many)
    (-> db
        (assoc :result (calc-stats (:user-history db)))
        (assoc :done true)
        )
    (set-new-word db [])))

(defn debug [db]
