Added comments

added comments to the code to explain my thought process