Adding some comments to define what the functions do