updates url to dynamic from window