                   deps
                   parent-groups)
           ready' (->>
-                   parent-groups
-                   (filter (comp empty? deps' second))
-                   (filter (comp not (partial contains? finished)))
-                   (filter (comp not (partial contains? (set ready))))
-                   set)
+                   (map second parent-groups)
+                   (mapcat vec)
+                   (filter (comp empty? deps')))
+          ready'' (->>
+                    ready'
+                    (filter (comp not (partial contains? finished)))
+                    (filter (comp not (partial contains? (set ready)))))
           rw-count' (+ rw-count (count df'))
           [nws ready4] (split-at rw-count' ready')
+          _ (println "ready':" ready')
+          _ (println "ready'':" ready'')
           w'' (reduce
                 assoc-remaining-work
                 w'
                 nws)]
       (recur
-        (inc ttl)
+        (+ ttl dt)
         rw-count'
         f'
         w''

   ready]
  (println "==== rw-count ====")
  (println rw-count)
  (println "==== working ====")
  (println working)
  (println "==== finished ====")
  (println finished)
  (println "==== ready ====")
  (println ready)
  (if (empty? ready)
    ttl
    (let [[w' df'] (reduce
                     (fn [[d f] [k v]]
                       (if (zero? (dec v))
                         [(dissoc d k) (conj f k)]
                         [(assoc d k (dec v)) f]))
                     [{} #{}]
                     working)
          f' (apply conj finished df')

              assoc-remaining-work
              {}
              working)
            dependencies
            d-parents
            rdy')]
    v))
