move base URL finder to Utils