add 'flush' support