minor edits and commenting