The Charlotte Hornets will be waiving and stretching the final year of Nicolas Batum’s contract in order to create cap space to sign Gordon Hayward, according to Rick Bonnell of The Charlotte Observer.

Batum, who signed a five-year, $120 million contract with the Hornets in 2016, will be entering the final season of his contract this upcoming season. However, instead of paying Batum the $27.13 million he’ll be owed for the 2020-21 season, the Hornets will be stretching that amount across three seasons at $9.04 million annually instead. The Hornets were forced to make this move in order to sign Hayward to a four-year, $120 million deal. So in other words, the Hornets will be devoting about $39 million of cap space to Hayward in each of the next three years.

This past season, Batum appeared in just 22 games, averaging 3.6 points, 4.5 rebounds and 3.0 assists in 23.0 minutes per game. The 32-year-old small forward also shot the ball poorly, shooting  34 percent from the field and 28 percent from three-point range.

Nevertheless, even though Batum performed horribly last season, he may still be a valuable asset to a contender team such as the Milwaukee Bucks or the Houston Rockets. If Batum does clear waivers and signs with a team, it’ll most likely be for the minimum salary.

As for Hayward, this deal with the Hornets has to be one of the best things that has happened to him in his NBA career. This past week, many people were surprised when Hayward opted out of his $34.2 million player option. However, it looks like Hayward will only be taking a $4 million pay cut to join the Hornets.