fixing issues.
added comments.