added print flushs