Created a function which generates the base URL