Sales are less bad at Macy’s heading into the all-important holiday season.

The retail giant also struck a deal with Brookfield Asset Management involving 50 Macy’s stores, which allows Brookfield to redevelop the site or add to it. Brookfield has the exclusive rights to do so within a 24-month period.

It follows a deal Macy’s struck last week with General Growth Properties to sell five locations, helping the retailer to leverage its vast real estate portfolio and generate cash.

“The Brookfield alliance [gives] us greater flexibility to invest in our most productive and highest potential locations, and to make the most of our real estate assets,” CEO and Chairman Terry Lundgren said in a statement.

Macy’s stock shot up more than 9 percent to nearly $42 in morning trading after same-store sales fell less than feared in the third quarter. The retailer also forecast a smaller sales decline for the full year.

Same-store sales fell 2.7 percent in the quarter, compared with a decline of 3.9 percent in the year-ago period. Total sales declined 4.2 percent, to $5.7 billion.

The company said it expects comparable sales to decrease in the range of 2.5 to 3 percent for the full year, compared with a previously estimated decline of 3 to 4 percent.

Helping to drive sales at Macy’s are Apple smartwatches and watches from Michael Kors, Lundgen said, although sales of cosmetics were disappointing.

“Cosmetics was one of the weaker businesses in the third quarter,” CFO Karen Hoguet told analysts during an earnings call. “And we are focused on how to improve that in the fourth quarter, though the fragrance business has been very strong.”

Macy’s closed 41 stores last year and has announced plans to close 100 more early next year.