add some necessary comments to the code