   [reservation
    {:keys [cars flights rooms]}
    {:keys [n-queries]}
-   workers]
+   secondary-workers]
   "Process a reservation: find a car, flight, and room for the reservation and
   update the data structures."
   (dosync
     (log "start tx for reservation" (:id @reservation))
-    (send (rand-nth workers) :car    cars    reservation n-queries)
-    (send (rand-nth workers) :flight flights reservation n-queries)
-    (send (rand-nth workers) :room   rooms   reservation n-queries)
+    (send (rand-nth secondary-workers) :car    cars    reservation n-queries)
+    (send (rand-nth secondary-workers) :flight flights reservation n-queries)
+    (send (rand-nth secondary-workers) :room   rooms   reservation n-queries)
     (let [pnr (generate-pnr reservation)]
       (alter reservation assoc
         :status :in-process

          secondary-workers
            (doall (map #(spawn reserve-relation-behavior % *actor*)
                        (range n-secondary-workers)))
          reservation-workers
            (doall (map #(spawn reservation-behavior
                          % *actor* secondary-workers data options)
                        (range n-workers)))]
      #_(log-data data)
      (doseq [[worker reservation] (zip (cycle reservation-workers) reservations)]
        (send worker reservation))
      (become master-waiting-behavior (* n-reservations 4)))))

; MAIN



" (:summary (clojure.tools.cli/parse-opts nil cli-options))))

(defn parse-args [cli-args]
  "Parse command line arguments.

  Prints help or error messages as needed.

  Returns the options if everything went as expected, or nil if the program
  should not proceed. Hence, can be used in a when-let."
  (let [{args :options errors :errors}
          (clojure.tools.cli/parse-opts cli-args cli-options)
        print-error? (not-empty errors)
        print-help?  (or (not-empty errors) (:help args))
        proceed?     (not (or print-error? print-help?))]
    (when print-error?
      (println "ERROR: Error when parsing command line arguments:\n "
