minor edits, mostly for better organization