add flush method
change method name