Added flush method