renamed flush_each to flush_every