compute winnings