Better way to construct the url