added comments to js