updated popup.js