i added comments to the code