refactor get_country_name helper