changed to document.location from window.open