Adding comments to functions

Describe the functionalities