MIAMI - Goran Dragic plays quickly and decides quickly.

The Miami Heat are pleased about both.

Dragic wasted little time in accepting a five-year deal that will ultimately be worth between $85-90 million to remain with the Heat, the sides coming to an agreement in principle only a few hours after the NBA's free agency shopping period opened Wednesday. A person with knowledge of the negotiations confirmed the terms to The Associated Press on condition of anonymity because the deal cannot be finalized until July 9 per league rules.

Heat President Pat Riley later confirmed that the team plans to sign Dragic, but could not comment further because of NBA policies regarding free agents.

"Welcome back to the family," Heat centre Hassan Whiteside wrote to Dragic on Twitter, adding "and let me borrow 5 dollars."

It was long assumed that the Heat would keep the 29-year-old Dragic, especially after they gave up two future first-round selections to land the point guard in a deal with Phoenix this past season.

Meanwhile, the Heat continued having talks with Dwyane Wade on Wednesday. Wade is the team's lone remaining undecided free agent and is still expected to receive serious interest from the Los Angeles Lakers and others, but the Heat want him back.

Wade has not commented publicly during the free-agent process, but has said as recently as the end of this season that he would like to stay in Miami. Dragic took less money — he could have commanded at least $20 million more over the life of his soon-to-be-completed new deal — in an effort to allow the Heat the flexibility to keep Wade in Miami, and at least one of their teammates is optimistic that it will work out.

"If we can get the whole crew back together, it would be the best thing since the Backstreet Boys," Whiteside told The AP in an interview Wednesday. "We can break out. We can make a big splash in the NBA."

Dragic averaged 16.6 points on 50 per cent shooting in 26 games with the Heat. Between Miami and Phoenix, he averaged 16.3 points in 78 games. He said when Miami's season ended that the fifth year — something that only Miami could offer — would be a significant factor in his free agent decision making, and in the end he took a deal worth roughly $20 million less than he could have commanded.

The Heat brought Dragic in last February thinking that a lineup of him, Wade, Chris Bosh, Luol Deng and Whiteside would be good enough to challenge in the Eastern Conference.

They never played a second together.

On the very same day — almost at the same moment — that the Dragic-to-Miami trade became official, the Heat learned that Bosh had a blood clot on one of his lungs, a condition that ended the All-Star forward's season.

Deng could have been a free agent this summer but elected to stay for $10.1 million. Bosh, Whiteside and now Dragic are locked up, and now the Heat are left waiting for Wade to decide if he will return to Miami for a 13th season or go elsewhere.