check which node is the winner and make that the first branch