                     (range node-count))
         nodes (into {} (for [label labels]
                          [label (create-random-node label)]))
-        create-random-edge #(take 2 (shuffle labels))
-        edges (repeatedly edge-count create-random-edge)
+        create-random-edge #(->> labels shuffle (take 2) sort)
+        edges (distinct (repeatedly edge-count create-random-edge))
         nodes (reduce add-edge nodes edges)
         state (infer-new-search-state :dfs nodes)]
     (assoc state

                    :bfs (q/color 225 150 225)
                    :visiting (q/color 0)
                    :edge (q/color 240 150)
                    :untouched (q/color 240 150)})))

(defn update-movement
  "apply changes to velocity, position, and size"

  (-> state update-movement update-colors))

(defn draw-edges [state]
  (let [{:keys [nodes colors edges]} state]
    (q/fill (:edge colors)) ; set fill as edge color
    ;; draw each edge as a quad. Determine points using some mathematical math.
    (doseq [edge edges]
