 
 (defn handle-mousemove [evt]
   (when @mouse-down 
-    (.log js/console (str "(" (.-offsetX evt) "," (.-offsetY evt) ")"))))
+    (swap! curr-stroke (fn [curr-str] (str curr-str (str "'(" (.-offsetX evt) " " (.-offsetY evt) ") "))))))
+
+(defn format-strokes []
+  (str "{" :scale " " (.-width (.getElementById js/document "canvas")) " " :strokes " [" (string/join " " @strokes) "]}"))
+
+(defn call-set-strokes []
+  (POST "/write-character" {:param {:strokes (format-strokes)}}))
 
 (defn start []
   (let [canvas2d (.getElementById js/document "canvas")

  ;; optionally touch your app-state to force rerendering depending on
  ;; your application
  ;; (swap! app-state update-in [:__figwheel_counter] inc)
  (start))

(set! (.-onload js/window) start)

;; define your app data so that it doesn't get over-written on reload

(defonce mouse-down (atom false))
(defonce strokes (atom []))
(defonce curr-stroke (atom "["))

(defn handle-mouseup [evt]
  (swap! strokes (fn [arr] (conj arr (str @curr-stroke "]"))))
  (swap! curr-stroke (fn [_] "["))
  (swap! mouse-down (fn [_] false)))

(defn handle-mousedown [evt]
