moving web request to background.js