Commenting the code

commenting the code for better understanding