first draft of rewrite