If you can’t wow Wall Street with your financials, you can try it with your dealmaking.

Macy’s m reported its seventh straight quarter of declining comparable sales Thursday. They fell 2.7% in the third quarter, which was a smidgeon better than what Wall Street was expecting.

But what made Macy’s m stock pop more than 7% in early trading was yet another deal the department store reached to wring out monetary value from its real estate.

The company said it had entered a partnership with Brookfield Asset Management. The deal gives the real estate investor the right, for up to two years, to create a “predevelopment plan” for about 50 of Macy’s real estate assets, which are made up mostly of owned and ground-leased stores and the surrounding land. Macy’s has the option to add more assets for Brookfield to manage.

With its prolonged sales slump, Macy’s has been pressured—most notably from activist investor Starboard Value—to extract money from its real estate. The company, which also owns the Bloomingdale’s and Bluemercury chains, operates some 750 namesake stores. In August, Macy’s announced it would close about 100 of those stores on top of 40 announced in January. And last month, the company announced it was selling five stores to General Growth Properties ggp , the No. 2 mall developer in the United States.

 

Macy’s has struggled in the last two years as more shoppers have migrated to Amazon.com amzn , which is set to eclipse Macy’s as the nation’s No. 1 seller of apparel next year. Off-price chains like TJX’s thx T.J. Maxx, have also siphoned off much of Macy’s business, as has a resurgence by its old mall rival, J.C. Penney. jcp .

The department store’s profit fell 86% to $17 million in the third quarter, but Macy’s CEO Terry Lundgren, who is stepping down in February, pointed to initiatives like its new Apple aapl boutiques as moves that will get the chain back on track.

“As we have said, a setback is a setup for a comeback and that is why we continue to look with confidence at the close of 2016,” Lundgren said in a statement.

Macy’s is looking to slim down its sprawling fleet of stores to focus on its better locations, including 150 top stores that are getting the bulk of its remodeling and improvement budget.