The anticipated election of Joko Widodo (known as Jokowi) is a John Fitzgerald Kennedy moment in Indonesian history—a change of generations and a herald of hope that Indonesia can take a great leap forward in reforming its sclerotic state apparatus and unshackling its economy.

There’s been much written about the reform agenda and Jokowi’s likely foreign and defence policy approaches but there are other political challenges worth examining. These include the role of Vice President Jusuf Kalla, cabinet formation and the parliament, and what to do with Prabowo.

Kalla is an experienced businessman and politician. He has been a minister and was an active vice-president in President Susilo Bambang Yudhoyono’s first government (2004–09). During the campaign, questions were asked about who the real president would be in a Jokowi presidency, but Jokowi should ignore those barbs and delegate Kalla some of the tough challenges rather than relegate him to the back room—not that Kalla would stay there, so it’d be smarter to harness and direct his energy.

Publicly Jokowi refused to horse trade cabinet posts prior to the elections, claiming he would seek the best person for the job whether or not they are party members and, by implication, whether or not they had supported his election. Nevertheless, he’ll have political debts to honour. This includes questions as to whether voting for Jokowi really meant voting for Megawati Sukarnoputri as the puppet master.

It‘ll have to be clear whether Indonesian Democratic Party of Struggle (PDI-P) members get cabinet seats. PDI-P is virtually a private company owned by Megawati, and this will have to be challenged well before the next elections if the party is to be institutionalised and Jokowi’s leadership put beyond doubt. Megawati is a useful patron but will be a liability if she insists on retaining virtual ownership of the party. Meanwhile, there are other questions to answer: will Jokowi be forced to accept the political lightweight, Puan, Megawati’s daughter, as a junior minister to preserve the Sukarno franchise over the party? And, will Megawati insist on elevating her favourites to the ministry rather than the most capable members of the party?

It might be assumed from some of Jokowi’s statements that he’ll ignore politicians and choose technocrats for his cabinet or at least the most of important posts. But that’ll leave him with the challenge of forming a parliamentary coalition to pass his legislation. If he has to forge different coalitions for each bill or packets of legislation, that’ll suck a lot of energy out of the executive—especially given that Prabowo had the support of parties winning 59% of the vote April parliamentary elections. It might also see a de facto executive formed within the parliament obstructing or passing legislation antithetical to Jokowi’s program.

So it’s hard to see how he can avoid some horse trading over cabinet posts, especially given the close margin of victory. Fortunately for Jokowi, Indonesian political parties are highly promiscuous and will be quick to desert their defeated champion in search of power so party alliances will become highly fluid until such time as Jokowi selects his cabinet.

There’s much that Jokowi can do under existing legislation and his executive authority to get his agenda rolling, but he’ll need parliamentary support to get his budgets and legislative slate through parliament and his senior appointments endorsed. Jokowi will need to give a portion of the 10 political parties most of the 34 cabinet posts and the most obvious place to start, after shoring up his own team, is with Golkar, which Kalla led during the first SBY government. Kalla remained a Golkar member but he’s a bitter opponent of its current leader Aburizal Bakrie (also known as ‘Ical’)—and obviously received no official backing from the party during the election.

Golkar will desert Ical in a flash but there’ll have to be some preliminary horse trading before a formal process for re-electing Kalla or another Golkar official allied to Kalla as party leader. Meanwhile, Jokowi can keep Golkar’s demands in check by negotiating with the other parties.

The Jokowi campaign was supported by only one of the four major Islamic parties, although their support for either candidate wasn’t monolithic. Given the poor showing of PDI-P in the parliamentary elections, where it won only 19%of the vote, Jokowi might be tempted to include representatives from one or two of those parties in cabinet to broaden his parliamentary coalition and boost his 2019 re-election bid.

In relation to Prabowo, Jokowi has four options: ignore him and hope that he fades away; offer him a sinecure like ambassador to Saudi Arabia; follow Machiavelli’s advice and instruct various legal channels to reopen investigations of the crimes he’s alleged to have committed in 1997-98; or cut a deal that would end Prabowo’s political career.

The closeness of the vote demonstrates that there were considerable doubts about Jokowi’s readiness for the presidency so he’ll need to move quickly on forming his cabinet, creating a workable parliamentary coalition, and use executive powers to set his program in motion. He’s unlikely to be challenged in the way Kennedy was over Cuba but he could find some of his domestic opponents and vested interests just as tough.