changed manual method to make the URLs for the urljoin function