adding comments to functions
Renaming variables for the sake of coding conventions