first draft of major rewrite