Implement flush method