added flushes to output