major edits and rewrite