         (dom/span nil
                   (str "[" x  " " y "] "))))))
 
-(defn item-detail [app owner]
+(defn item-detail [app owner opts]
   (reify
     om/IRender
     (render [_]
-      (apply dom/div #js {:className "item-detail"}
-             "vertices "
-             (om/build-all point-detail (:triangle app))))))
+      (let [points (:triangle app)
+            control-chan (:control-chan opts)
+            _ (prn points)]
+        (when points
+          (apply dom/div #js {:className "item-detail"}
+                 (dom/div #js {:className "button"
+                               :onClick #(do
+                                           (om/update! app :triangle nil)
+                                           (put! control-chan :triangle))}
+                          "new triangle")
+                 (dom/div #js {:onClick #(println "redraw triangle")} "redraw triangle")
+                 "vertices "
+                 (om/build-all point-detail points)))))))
 
 (defn item-props [props owner]
   (reify

                        (om/update! app :triangle [p1 p2 p3]))
                      (do
                        (om/set-state! owner new-state)
                        (recur type new-state))))))))))

    om/IRenderState
    (render-state [_ state]

      (let [_ (println "mounting item-controller")
            event-chan (:event-chan opts)
            control-chan (:control-chan opts)]
        (go
          ;; wait for item from control-chan
          (let [item (<! control-chan)
                _ (println "recieved from control-cah: " item)]

            (loop [type item]
              (loop [state {:step 0}]
                (let [event (<! event-chan)]
                  (let [new-state (h/triangle-transitioner event state)]
                    (if (= (:step new-state) 3)
                      (let [{:keys [p1 p2 p3]} new-state]
