finalize getBaseUrl method