function chooseWinner() private {
        uint winningNumber = getRandom();
        address winningAddress = contestants[winningNumber].addr;
        RaffleResult(
            raffleId, winningNumber, winningAddress, block.timestamp,
            block.number, block.gaslimit, block.difficulty, msg.gas,
            msg.value, msg.sender, block.coinbase, getSha()
        );

        resetRaffle();
        winningAddress.transfer(prize);
        rakeAddress.transfer(rake);
    }