feature: added flush() method.