calculate baseURL