changes to popup.js