added some new code to background.js