Apple CEO Tim Cook still sees great potential in the Chinese market despite a drop in its revenue from the country in the first quarter.

In an interview to Jim Cramer of CNBC’s Mad Money program, Cook said Monday that the middle class in China is expected to boom from 50 million people five years ago to almost 500 million in the next five years. “This is an unprecedented growth of the middle class,” said Cook, adding that he “could not be more optimistic about China.”

To a question from Cramer, Cook said it was an error by him not to to mention the figures about the burgeoning Chinese middle class during the company’s recent earnings call.

Apple reported last month that the number of smartphones it sold worldwide fell by 16 percent to 51.2 million units in its fiscal second quarter ended March 26. The company saw a 26 percent year-on-year decline in revenue from Greater China, its second largest market. The revenue drop in mainland China was less at 11 percent.

The company’s overall revenue and profit for the quarter also fell from the same period last year. But Cook’s message on CNBC was that Apple was still doing fine, despite some investors and analysts expressing reservations about the outlook for the company.

Apple is facing iPhone fatigue and pressure is mounting for the company “to innovate a new wow design beyond its standard rectangle form factor,” said Neil Mawston, executive director at research firm Strategy Analytics, for example.

The company is to an extent the victim of its own success in the previous year with the iPhone 6. People are upgrading at a lower rate than they did last year but still higher than the year before, as the company had an “abnormally high upgrade rate” last year as people bought into the iPhone 6, Cook said. “Now we are comparing to that along with the other things going on that many companies are facing with currency rates and macro economics, etc.,” he added.

Cook said the company is seeing higher rates of people switching from Android phones to iPhones, which was the largest ever in the last six months.

In China, its second largest market by revenue, switchers were up 40 percent from the first half of last year to the first half of this year, Cook said. The new 4-inch iPhone SE is doing well in that market and the company hopes to resolve soon with Chinese government agencies and businesses the issues that forced it to take its books and movie services online.

Services such as books and movies is an area in which the company sees great potential. Revenue from services, including Apple Music and the App Store, grew 20 percent to US$6 billion in the first quarter, and is the second largest revenue segment for the company.

The relationship with Apple doesn’t stop when people buy an iPhone, but continues with users buying apps across the App Store, or subscribing to Apple Music, buying songs, renting moves, using Apple Pay and buying additional storage on iCloud, Cook said. All this follows from the number of people using Apple devices and there are currently over a billion in use, he added.