The Miami Heat lost out on the Gordon Hayward sweepstakes on Tuesday, as the one-time All-Star agreed to sign with the Boston Celtics. Since then, they have quickly moved on to secure key players from last year’s roster, including signing Dion Waiters to a four-year deal.

The Heat are also working on a deal with forward James Johnson, who was an essential part to the team’s success during the latter half of the season. However, before locking up Johnson, the Heat must make a move to clear cap space. After signing Kelly Olynyk to a four-year, $50 million-plus deal [VIDEO], they are now financially strapped and cannot give Johnson the huge contract that he deserves.

Even after waiving Chris Bosh, the Heat need additional cap room to make way for Johnson.

Miami Heat and Dallas Mavericks discussing a crucial deal

The Heat are currently discussing a trade with the Dallas Mavericks that would send Josh McRoberts and a future second-round pick to Dallas for A.J. Hammons, a former second-round pick. McRoberts, 30, has an expiring $6 million contract. The 10-year veteran was injured for most of last season, playing 22 games and averaging 4.9 points and 3.4 rebounds. McRoberts’ inability to remain healthy immediately made him the odd man out. The Heat tried to dump his salary during the trade deadline but were unable to find suitors. The Mavericks, who are in rebuilding mode, would gladly take an expiring contract and an additional pick to help the Heat out.

At this point, it’s unclear whether the Mavericks would immediately waive McRoberts or give him a roster spot.

James Johnson is a top priority

The most important thing for the Miami Heat right now is to secure Johnson, who is also drawing interest from the Utah Jazz. The 30-year-old veteran was a key contributor for Miami and has been determined to remain in South Beach. However, after having a breakthrough year, many teams have been actively pursuing him, so the Heat must work fast if they want to try to keep him. Once the Heat are able to reach an agreement with the Mavericks, and once they acquire McRoberts, expect them to re-sign Johnson.

In his eighth year in the league, Johnson averaged a career-high 12.8 points, 4.9 rebounds, and 3.6 assists, and shot nearly 48 percent from the field. He previously played for the Toronto Raptors, Memphis Grizzlies, Sacramento Kings, and Chicago Bulls, but seems to have found a permanent home in Miami.