added comments and edits