refactoring the http calls
handling success for countries in factory methods
fixed merge conflict