minor edits and updated comments