Zillow investors got a glimmer of hope after the company set ambitious new revenue goals and said it was winding down its home-flipping business faster than expected. 

Shares surged as much as 19% in late trading after the company beat estimates for fourth-quarter results. Zillow’s success selling homes pared expected writedowns and helped the company post an adjusted loss before interest, taxes, depreciation and amortization, or EBITDA, of $400,000. The average analyst estimate was for a loss of $177 million.

The rapid wind-down enables Zillow to move on to its next task, which CEO Rich Barton said would entail building a “housing super app” to integrate the currently fragmented process of buying or selling a house. That project, which includes helping house hunters schedule tours and get mortgages, will translate into $5 billion in annual revenue and 45% margins on EBITDA by the end of 2025, according to Barton.

“People are asking us, how are you going to grow?” Barton said in an interview. “We put a stake in the ground. If people don’t believe it, at least they’re going to hear that I believe it.”

Zillow’s fourth-quarter results bring the company nearer to the end of a difficult chapter, in which it undertook an ambitious effort to build a tech-driven home-flipping operation. The business turned out to be more volatile than Barton had expected, and Zillow announced it was getting out of the operation in November. That move accelerated a stock market sell-off that wiped out more than $35 billion of value. 

While investors are still waiting for Barton to outline concrete steps needed to realize the new goals, they were pleased by Zillow’s wind-down efforts. The company sold 8,300 homes in the fourth quarter, topping a previous expectation for about 5,000. 

The company said its total writedowns on Zillow Offers were $405 million, roughly $160 million less than it expected when it said it was exiting the business.