rewrite with reflux