add flushing
the world's worst proof of concept