Adding Comments

Adding comments to explain each of the 2 functions