             (= @current-branch-ref (branch :root))))
     false))
 
+(defn get-coloring [branch]
+  (prn "HIGHLIGHTED: " @highlighted-branches)
+  (if (contains? @highlighted-branches (hash branch))
+    "red"
+    (if (is-on-current branch) "green" "black")))
+
 (defn scale-branch-model [model max-width] model)
+
+(defn highlight-branch [root path]
+  (when-let [next-step (first path)]
+    (let [branch-part (root next-step)]
+      (do 
+        (swap! highlighted-branches assoc (hash branch-part) true)
+        (if (and (= 1 (count path)) (= :cont next-step))
+          (let [fp? (last @(branch-part :data))]
+            (if (contains? fp? :cont)
+              (highlight-branch fp? [:cont])))))
+      (let [fp (last @(branch-part :data))]
+        (highlight-branch fp (rest path))))))
+
+(defn visualize-merge-candidates [fork-point path-to-a path-to-b]
+  (prn "highlighting: " path-to-a " " path-to-b)
+  (highlight-branch fork-point path-to-a)
+  (highlight-branch fork-point path-to-b)
+  (refresh-view))
 
 (defn render-stub [branch start-point]
   [{ ; id nessecary? not for now... we do not alter the morph structure but just rerender it completely
     :morph {:MorphClass "Path"
             :Position start-point
-            :onClick (fn [e] 
-                        (prn "switching via stub click to branch " (branch :id))
+            :onClick (fn [this] 
                         (@branch-callback-fn branch)
                         false)}
     :shape {:ShapeClass "Path"

            :PathElements (smoothen (map #(translat - % start) [start (assoc end :x (start :x)) end]))}})

(defn render-fork [branch cont fork start-point]
  (let [fill (if (is-on-current cont) "green" "black")
        end-point {:x (count branch) :y 0} ; based on start-point and number of entries
        [cont-path cont-space] (render-branch cont end-point) ; we have a fork, return a path that visualizes branching
        fork-start-point {:x (+ (end-point :x) 10) :y cont-space} ; based on end-point and space occupation of the cont
        [fork-path fork-space] (render-branch fork fork-start-point)

            [{; id nessecary? not for now... we do not alter the morph structure but just rerender it completely
             :morph {:MorphClass "Path"
                     :Position start-point
                     :onClick (fn [this] 
                                (@branch-callback-fn (cont :root))
                                false)}
             :shape {:ShapeClass "Path"
