BlackBerry CEO John Chen has spent his first almost five years at the helm of the former smartphone giant trying to turn things around. He appears to be succeeding, at least in the eyes of BlackBerry’s board of directors. They rewarded Chen on Thursday with a new five year contract including compensation valued at close $150 million in total.
Re-upping Chen, who focused his turnaround efforts on growing sales of software and security services while cutting phones, looks like an easy call if the board was tracking BlackBerry’s stock price. It’s up more than 84% over the past year, trading at $13.19 midday on Thursday.
Under the new contract, Chen is entitled to the same $3 million salary and bonus per year as his prior contract, or a total of $15 million. He also gets 5 million restricted stock units that vest 20% per year and another 5 million units that will vest if BlackBerry’s stock price reaches $16 to $20. The 10 million units are worth $132 million at Thursday’s midday price and could be worth even more if the stock keeps rising. Chen will get an additional cash award of an undisclosed amount if BlackBerry’s stock hits $30. (The amount will be disclosed in May securities filing, the company said.)
“John engineered a successful turnaround and has the company repositioned to apply its strengths and assets to the Enterprise of Things, an emerging category with massive potential,” Prem Watsa, the company’s lead director, said in a statement. “John’s leadership is critical and the Board has determined that it is in the best of interests of BlackBerry and its shareholders to continue his service through November 2023.”
Get Data Sheet, Fortune’s technology newsletter.
A repositioning was critical. When Chen took over in November 2013, BlackBerry had been battered by the popularity of Apple’s (aapl) iPhone and growing sales of Android phones running Google (googl) software. Sales in the company’s fiscal year ended March 2014, totaled $6.8 billion, down 38% over the prior year and by almost two-thirds from two years earlier. The company’s stock price, which had been over $100 in 2008, was down around $6.
Chen moved quickly to cut costs and emphasize selling software and services to businesses that wanted secure communications running on all kinds of phones, buying mobile security firm Good Technology in 2015 for $425 million. Chen also looked to squeeze licensing fees from the company’s intellectual property, striking a deal with Chinese manufacturer TCL Communications to make phones under the BlackBerry brand and pay the company licensing fees. The moves paid off with growing revenue from the newer businesses.
Not every move was a winner. He didn’t end in-house phone production until September 2016, and sales of the QNX operating system for cars and other smart machines haven’t developed as quickly as some hoped. Revenue probably won’t reach even $1 billion in the current fiscal year.
But if Chen’s turnaround continues to gain traction and benefit BlackBerry’s (bbry) shareholders, he’ll be richly rewarded.