function refundBet(uint _betId) external {
        Bet storage bet = bets[_betId];
        uint amount = bet.amount;

        require (amount != 0);

        require (block.number > bet.placeBlockNumber + BET_EXPIRATION_BLOCKS);

        bet.amount = 0;

        uint winAmount;
        winAmount = getWinAmount(amount);

        lockedInBets -= uint128(winAmount);

        sendFunds(bet.gambler, amount);
    }