some refactoring to make _selectListItem and selectCountry use the same code
added test