Goran Dragic agreed to a new deal with the Miami Heat on Wednesday.

According to ESPN, the deal is for five years and $90 million. Dragic was eligible for a five-year max deal from the Heat worth in excess of $100 million. He was also eligible for four year max deals from other teams for $85 million. However he wanted to stay in Miami. The deal does include a player option after the fourth year.

“Congrats @Goran_Dragic on new deal welcome back to the family and let me borrow 5 dollars #HeatNation” Heat center Hassan Whiteside tweeted.

Dragic was traded to the Heat by the Phoenix Suns in February. He averaged 16.6 points and 5.3 assists in 26 games with the Heat last season, according to Fox Sports. In 78 games with the Suns and Heat he averaged 16.3 points. Dragic also shot 50.1 percent from the field.

The Heat can’t officially sign Dragic until the NBA’s free-agent moratorium ends on July 9. The Heat will now try to re-sign free agent Dwyane Wade.