Final working script.js