Modifications to script.js file