On Thursday, Sears agreed to sell its Craftsman division to Stanley Black & Decker for much needed cash. The sale by Sears of Craftsman, which was valued at over $775 million, was to help prevent the filing of bankruptcy by raising cash.

For Sears, the sale of one of its most classic brands is the most recent move to increase its balance sheet as it goes through a prolonged slump in sales.

Edward Lampert the CEO and chairman of Sears has been struggling for a number of years to help the company through both operational fixes and esoteric maneuvers.

Retailers almost across the board are going through difficult times. Kohl’s and Macy’s announced this week their sales during the holiday shopping season were less than expected.

Sears suffered during the high season as well, with its sales at comparable stores of Kmart and Sears down over 12%.

Sears has lagged behind peers consistently for years, as analysts pointed to the underinvestment in stores and declining stores.

Last September, Wall Street analysts estimated that the negative cash flow at Sears for its fiscal year 2016 would reach $1.5 billion.

Predictions of being forced to file bankruptcy have dogged Sears of late. However, on Thursday it listed its most recent initiatives for helping its cash position.

The initiatives include closing over 150 additional stores and raising as much as $1 billion through a loan of $500 million backed by its REIT and a loan announced previously from the hedge fund of Lampert.

Stanley Black & Decker can sell the Craftsman line of tools in more outlets as only 10% of the entire lineup of products is sold outside Sears.

Reaching an agreement for Craftsman took a number of months. In the spring of 2015, Sears announced it hired advisers to help explore the possible sale of brands such as Kenmore, Diehard and Craftsman to help raise cash.

A number of companies approached Sears about the Craftsman line. In late fall of last year, after Stanley Black & Decker backed away from a purchase, due to purchasing another line, Sears returned and asked if the company would reconsider and bid again for Craftsman.

The two finally agreed in a deal that will pay $525 million at the closing and another $250 million 3 years after the deal has closed.

Sears is to collect a percentage of sales of new Craftsman products for 15 years after the close of the deal.