         (loop [service-id->scaling-executor-chan initial-state]
           (recur
             (let [[data channel] (async/alts! [executor-multiplexer-chan query-chan] :priority true)]
-              (cond
-                (= channel executor-multiplexer-chan)
+              (condp = channel
+                executor-multiplexer-chan
                 (let [{:keys [service-id scale-amount correlation-id] :as scaling-data} data]
                   (cid/with-correlation-id
                     correlation-id

                                                          service-ids-set)]
                          (cid/with-correlation-id
                            correlation-id
                            (when (seq deleted-service-ids)
                              (log/info "no longer tracking following services:" deleted-service-ids)
                              ; trigger closing of the scaling executors for the services

                        (assoc current-state :continue-looping false :timeout-chan nil)
                        state-chan
                        (let [{:keys [service-id->healthy-instances service-id->unhealthy-instances service-id->expired-instances]} args
                              existing-service-ids-set (set (keys service-id->router-state))
                              service-ids-set (set/union (-> service-id->healthy-instances (keys) (set))
                                                         (-> service-id->unhealthy-instances (keys) (set)))
                              deleted-service-ids (set/difference existing-service-ids-set service-ids-set)
                              new-service-ids (set/difference service-ids-set existing-service-ids-set)
                              service-id->router-state' (pc/map-from-keys
                                                          (fn [service-id]
                                                            {:healthy-instances (count (service-id->healthy-instances service-id))
