Macy’s topped Wall Street estimates for quarterly same-store sales and profit on Wednesday, benefiting from increased online sales and higher demand for items sold at its off-price stores.

Macy’s shares, which have so far lost more than a quarter of their value this year, rose about 3% to $22.46 in early trading.

Like its peers, the Cincinnati, Ohio-based department store chain faltered in the past few years as it struggled to adjust to a fiercely competitive retail landscape where shoppers buy more goods online at places like Amazon.

In response, the 160-year-old retailer has closed more than 100 stores since 2015 and cut thousands of jobs as mall traffic plummeted.

Macy’s has poured money into building up its private label clothing as well as expand its off-price venture, Backstage, by adding 45 more stores this year.

The company in February said it would also invest in categories where Macy’s has a strong market position such as dresses, jewelry, women’s shoes and beauty products.

[Read More]