Added comments to code

Added comments to code