move relative URL generation to the new URL func