   (ws/start response-handler)
   (println "Websocket up")
   (reset! world-atom (load-backup))
-  (loop [world (load-backup) line (read-line)]
+  (loop [ line (read-line)]
     (let [message (parse-message line)]
-      (if (valid? world message)
-        (recur (reset! world-atom (update-world world message)) (read-line))
-        (recur world (read-line))
+      (if (valid? @world-atom message)
+        (do (reset! world-atom (update-world @world-atom message)) (recur (read-line)))
+        (recur (read-line))
         )
       )))


(defn make-game [payload gid]
  {gid {:timestamp (:timestamp payload)
        :currentplayer (first (:players payload))
        :currentthrows []
        :playerorder (:players payload)

            [cheshire.core :refer :all]))

(defn parse-int [string]
  (cond
    (number? string) string
    (nil? string) 0
    :else (read-string (re-find #"\d+" string))
    )
  )

(defn parse-message [string]
