Update with comments

Comments are added for the description of the function