added flush() which doesn't exist