            :evmsgs []}
           eventhandlers))
 
-(defn advance [{:keys [ruleset] :as router} msg]
+(defn advance [{:keys [unit ruleset] :as router} msg]
   "Takes a message, runs it against ruleset and returns a sequence of routed messages."
   (debug "routing starting with" (printable-msg msg))
   (if (< (::transition-count msg) 100)

               :cljs [cljs.core.async.impl.protocols :as ap])
            #?(:clj  [clojure.core.async :as a]
               :cljs [cljs.core.async :as a])
            [ow.starbuck.protocols :as p]
            #_[ow.starbuck.core :refer [defcomponentrecord] :as oc]
            ))


  (def ruleset1
    {:units
     {:browser {:components #{:overbooked-checker :booker}
                :via :server-tunnel}
      :server {:components #{:auth-checker}
               :via :server-tunnel}}

     ;;; you can have many routes
     :routes
