changing to window.location