Creating a separate function to create the URLS + encorporating into functions.