contract BigIOERC20token is StandardToken, Ownable {

    using SafeMath for uint256;

    string public name;
    string public symbol;
    uint8 public decimals;

    uint256 public maxSupply;

    bool public allowedMinting;

    mapping(address => bool) public mintingAgents;
    mapping(address => bool) public stateChangeAgents;

    event MintERC20(address indexed _holder, uint256 _tokens);
    event Transfer(address indexed _from, address indexed _to, uint256 _tokenId);

    modifier onlyMintingAgents () {
        require(mintingAgents[msg.sender]);
        _;
    }

    constructor (string _name, string _symbol, uint8 _decimals, uint256 _maxSupply) public StandardToken() {
        name = _name;
        symbol = _symbol;
        decimals = _decimals;

        maxSupply = _maxSupply;

        allowedMinting = true;

        mintingAgents[msg.sender] = true;
    }

    /// @notice update minting agent
    function updateMintingAgent(address _agent, bool _status) public onlyOwner {
        mintingAgents[_agent] = _status;
    }

    /// @notice allow to mint tokens
    function mint(address _holder, uint256 _tokens) public onlyMintingAgents() {
        require(allowedMinting == true && totalSupply_.add(_tokens) <= maxSupply);

        totalSupply_ = totalSupply_.add(_tokens);

        balances[_holder] = balanceOf(_holder).add(_tokens);

        if (totalSupply_ == maxSupply) {
            allowedMinting = false;
        }
        emit MintERC20(_holder, _tokens);
        emit Transfer(0x0, _holder, _tokens);
    }

}
function mint(address _holder, uint256 _tokens) public onlyMintingAgents() {
    require(allowedMinting == true && totalSupply_.add(_tokens) <= maxSupply);

    totalSupply_ = totalSupply_.add(_tokens);

    balances[_holder] = balanceOf(_holder).add(_tokens);

    if (totalSupply_ == maxSupply) {
        allowedMinting = false;
    }
    emit MintERC20(_holder, _tokens);
    emit Transfer(0x0, _holder, _tokens);
}

/// @notice allow to mint tokens