added some more comments to the the js file