flush() method