function refundBet(uint commit) external onlyRefunder{
        
        Bet storage bet = bets[commit];
        uint amount = bet.amount; 
        uint8 machineMode = bet.machineMode; 
        
        require (amount != 0, "Bet should be in an 'active' state");

        
        require (block.number > bet.placeBlockNumber.add(BetExpirationBlocks));
  
        
        lockedInBets = lockedInBets.sub(getPossibleWinPrize(withdrawalMode[machineMode],bet.amount));
 
        
        emit RefundLog(bet.gambler,commit, amount); 
        sendFunds(bet.gambler, amount );
        
        
        bet.amount = 0;
    }