getCountrydata function working