added a bunch of comments to the code