(Reuters) - J. C. Penney Co Inc on Thursday reported quarterly results that topped estimates as the struggling retailer sold more jewelry and women’s, men’s and children’s apparel during the key holiday shopping season.

Its shares surged as much as 31.5 percent.

The 116-year-old company, once a storied American retailer whose stock is today worth less than one-tenth of its value two years ago, has been trying to strengthen its apparel business to compete with online retailers like Amazon.com Inc and off-price retailers like TJX Cos Inc.

Earlier this month, Penney announced it would stop selling major appliances including refrigerators and washing machines, and revamp store layouts.

Adjusted sales at J.C. Penney outlets open for at least 12 months fell 4 percent in the fourth quarter ended Feb. 2, better than the average analyst estimate of a 4.3 percent decline, according to IBES data from Refinitiv.

But total net sales decreased 9.5 percent to $3.67 billion from $4.05 billion the year before.

Net income totaled $75 million, or 24 cents per share, compared with $242 million, or 77 cents a share, in the same period last year. Excluding one-time items, the company earned 18 cents per share, 8 cents more than Wall Street expectations.

Plano, Texas-based Penney hopes to turn the company around in part by bringing back lost customers with more popular offerings and improving inventory management.

While Penney managed to reduce inventory by 13 percent last year, excess slow-moving stock still plagued the chain and forced unplanned markdowns, analysts said.

FILE PHOTO: A shopper leaves the J.C. Penney department store in North Riverside, Illinois, U.S., November 17, 2017. REUTERS/Kamil Krzaczynski/File Photo

“In spite of our past financial performance, we have already taken meaningful steps to drive improvement in key businesses such as women’s apparel, active apparel, special-sized apparel and fine jewelry,” Chief Executive Officer Jill Soltau said in a statement.

Analysts were unsure whether it could revive the business.

“I am a bit skeptical about the chain’s focus on apparel,” said research firm Retail Metrics founder Ken Perkins. “They are doing it because it’s a high-margin category but it remains a highly competitive space that will prove very difficult for Penney to differentiate itself from its competitors.”

Off-price apparel retailer TJX Cos Inc reported better-than-expected quarterly same-store sales on Wednesday.

The company has shut hundreds of stores over the years and revamped its locations to boost sales and revive profits as it struggles to avoid the same problems that sent longtime rival Sears Hold Corp into bankruptcy.

Penney’s interest coverage ratio - which measures its ability to pay interest on nearly $4.5 billion of debt from operating income - has been negative in all but one of the past seven years.

Both its stock and its bond prices have swooned. Penney shares have collapsed 70 percent in the last 12 months and briefly sank below $1 a share late last year. The stock rose 25 percent to $1.55 on Thursday but went as high as $1.63 earlier in the session.

(GRAPHIC: J.C. Penney size shrinking - tmsnrt.rs/2VpAK7t)

The company said on Thursday it will shut 18 full-line stores this year and nine ancillary home and furniture stores. It operates 860 department stores across the United States and Puerto Rico.

Penney said earlier this week it will end a clothing subscription service on Friday to focus on more profitable apparel sales.

The company also announced it has hired Michelle Wlazlo, who has 30 years of merchandising experience at Gap Inc and most recently Target Corp, as its new chief merchant. Penney will also bring in new heads of planning and allocation as well as asset protection.