adds flush method