better way to build the url