created ajax and api for countries