change to use window.location.search