adding calls to flush()