add flush support