added comments and micro edits