added comments to code
Added comments to code.