- added comments to make the code easier to read