use flushing framework instead of finished flag