function chooseWinner() private {
        uint lastWinningNumber = getRandom();
        address winningAddress = contestants[lastWinningNumber].addr;
        RaffleResult(
            raffleId, lastWinningNumber, 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);
    }