The Cavaliers just pulled off the impossible. They had tried to move Kyrie Irving for more than a month, but had been unable to find a viable trade partner for their unhappy point guard because they wanted to accomplish two contradictory goals. On one hand, they needed elite talent in return for Kyrie to have any chance of convincing LeBron James to stay past this season. On the other, they had to protect themselves if LeBron left by getting young pieces they could rebuild around. Trading an All-Star and getting better in the short and long term isn’t easy. Just look at how little the Pacers received for Paul George. And then Tuesday happened. The Cavs got everything they wanted from the Celtics: an All-Star (Isaiah Thomas), a defensive-minded rotation player (Jae Crowder), and two intriguing future pieces in Ante Zizic and the Nets’ unprotected first-rounder in 2018. They might have made this trade even if Kyrie didn’t want out.

Cleveland can plug Thomas into Irving’s role without missing a beat. He was a better version of Kyrie last year, at least in the regular season. They are both ball-dominant point guards who can score at will but struggle on defense. The difference is Thomas scored more often and more efficiently, despite playing with significantly worse teammates:

Thomas vs. Irving: Scoring Efficiency Player FGAs PPG True Shooting Percentage Player FGAs PPG True Shooting Percentage Thomas 19.4 28.9 0.625 Irving 19.7 25.2 0.58

Defenses sold out to stop Thomas, double-teaming and shadowing him all over the court, knowing guys like Avery Bradley, Marcus Smart, Al Horford, and Crowder couldn’t consistently punish them when left open. Thomas had a prime Allen Iverson season, but better, carrying a team full of role players to the no. 1 seed in the East. The Celtics were tied with the Warriors for the best offensive rating in the NBA (113.6) when Thomas was in, and they were dead last (99.0) when he was out. It was the exact opposite of the situation in Cleveland, where Kyrie got to play off one of the best players of all time. You can see the difference in the way the two point guards were guarded by the types of shots they took, per the tracking numbers at NBA.com:

Thomas vs. Irving: Shot Selection Player % of Tightly Contested Shots % of Wide-Open Shots Player % of Tightly Contested Shots % of Wide-Open Shots Thomas 11.1 17.8 Irving 7.7 22.5

Kyrie has the edge on Isaiah in long-term upside. Thomas is coming off a serious hip injury that knocked him out of the Eastern Conference finals, and he’s an extremely undersized guard turning 29 in the last year of his deal, hoping for max contract. And while neither is good defensively, Kyrie has the physical tools to compete on that side of the ball if he ever puts his mind to it. The only way Thomas could guard bigger and taller NBA players is if someone gave him a broomstick. Kyrie proved his worth in the past three NBA Finals, where he consistently lit up the Warriors, and it’s unclear whether Thomas could do something similar in a seven-game series against elite defenders like Klay Thompson and Andre Iguodala. Against the Lineup of Death, the only way to keep Thomas on the floor is to hide him on Iguodala, which is where the Cavs have traditionally put Kevin Love. Everything Cleveland does has to be viewed through the prism of Golden State, so the Cavs would have come out worse in the exchange if this were a one-for-one swap.

What makes the deal great for the Cavs is the other pieces. Crowder is known more for his favorable contract than anything he does on the court, but he’s a versatile defender who can slide between three positions and move the ball and knock down open shots on offense. He’s an upgrade over guys like Richard Jefferson, a 37-year-old going into his 17th season; Iman Shumpert, who lost the trust of the coaching staff by refusing to play within himself; and the newly acquired Jeff Green, who is now on his fifth team in the past four seasons. With Crowder and Cedi Osman, a 2015 second-round pick coming over to the NBA after a strong season overseas, Tyronn Lue can put next to LeBron two 3-and-D forwards who are in their athletic prime and know how to play basketball. They could also try to move Love for several more of those players in order to better match up with the Warriors. Either way, there is plenty of low-hanging fruit when it comes to improving Cleveland’s supporting cast. They consistently fell apart last season, with a net rating of minus-8.5, in the rare times LeBron wasn’t in. He will now have more chances to rest, which is huge for a guy who has played in the past seven Finals and is entering his 15th NBA campaign.

Even Zizic, the forgotten player in this trade, could help the Cavs. A 2016 first-round pick of the Celtics, Zizic was voted the Top Prospect in the Adriatic League two years ago, an award previously won by Dario Saric and Nikola Jokic, and he had great per-minute numbers last year as a starting center in the EuroLeague, where he played for former Cleveland coach David Blatt. Boston’s original plan was to start the 20-year-old upfront next to Horford, but that was put on hold after his disappointing showing in summer league. At 6-foot-11 and 250 pounds, Zizic is the type of traditional center rapidly falling out of favor around the NBA, but he gives Cleveland a backup to Tristan Thompson with the size to bang in the post, block a few shots, clean the defensive boards, and roll to the rim, something they didn’t have last season.

Despite the upgrades Cleveland made in this trade, though, the Warriors would still be an overwhelming favorite if the two teams met in their fourth consecutive Finals. The key to this deal for the Cavs isn’t what it does for them next season, but how it positions them going forward. Kyrie would have a lot more options than Thomas in free agency, and the line of teams looking to back up the Brink’s truck for a 5-foot-9 scorer entering his 30s who depends on his athleticism is not going to be particularly long. The Cavs have Isaiah’s Bird rights, and they may essentially be bidding against themselves to keep him. If LeBron goes to the Lakers, which is being treated like a done deal by many people around the league, a team built around Thomas and Kevin Love isn’t competing for a championship, but they will avoid the depths of despair that Cleveland sunk to after LeBron left the first time around. If things don’t work out, they can walk away from Thomas in the offseason, flip Love for younger players, and get a head start on a full-fledged rebuild.

Getting the Nets’ unprotected 2018 pick makes the trade a best-of-both-worlds situation for the Cavs. They can go all in on competing for a championship this season, knowing they have a golden ticket to grab a high-level young player in their back pocket, and they can plan for the future without tearing everything down if they lose LeBron. Brooklyn has an aggressive new front office, and it has upgraded its roster this summer, but the Nets will still be one of the worst teams in the NBA. While the odds of their pick ending up at no. 1 overall may not be as great as they were in 2017, Cleveland will at least have a chance at picking someone from a class that is loaded at the top with guys like Luka Doncic, Marvin Bagley III, Michael Porter Jr., DeAndre Ayton, and Mohamed Bamba. Even in a worst-case scenario, the Cavs will pick in the middle of the lottery. If they don’t like the guys available there, they should have no problem flipping it for a more established player.

Danny Ainge had been hoarding Brooklyn picks like Scrooge McDuck with a pile of gold coins because they allowed him to build for 2018 and 2021 at the same time. The Cavs can now do the same thing. If LeBron leaves again, they would have a full cupboard with which to reload: two All-Stars, one of the best contracts in the league (Crowder), two talented rookies (Zizic and Osman), and a high lottery pick. While any team with LeBron should be thinking about competing for a title, Golden State’s dominance means they also have to plan with one eye on the future as well. David Griffin, the popular executive who built their championship team, is gone, but the Cavs appear to be in good hands with new general manager Koby Altman. He just aced the first major test of his tenure.