using plain JS to update the url property