added comments

added more comments to the three cpp files