starting to rewrite flush