Added comment to code

Added comments to describe code.