added comments to the code to make it more readable