Your approach fetches all countries every time and selectively renders a subset of them -- the idea of this assignment was to fetch only the countries required using offset and limit parameters (see Prescott's PR which we reviewed in class). Imagine how practical this would be if we had 500,000 data items.