some nasty edits; not final