add comments

added comments explaining code.