added comments to script.js