     (if (some #(between? % minutes) schedule)
         :should-be-open
         :should-be-closed))
+
+; TODO refactor following four functions!
 
 (defn open-window
     [config]

          (println message)
          (irc-bot/send-message recipients channel message)))

(defn run-bot
    [config schedule]
    (loop [status :window-closed]
        (Thread/sleep sleep-amount)
        (let [minutes (calendar/minute-of-day)
              actual  (in-schedule? schedule minutes)]
            (println "minutes: " minutes status actual)
            (condp = [status actual]
                [:window-closed :should-be-closed] (recur :window-closed)
                [:window-closed :should-be-open]   (do (open-window config)  (recur :window-open))

(require '[clj-mrazik.irc-bot  :as irc-bot])

(def sleep-amount
    50000)

(defn between?
    [schedule-item minutes]
