Added comments to the first function