                   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''


(defn assoc-remaining-work
  [d c]
  (let [v (-> c first int (- 4))]
    (assoc c v)))

(defn count-seconds
  [ttl rw-count

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