contract CWG is owned, TokenERC20 {

    mapping (address => bool) public frozenAccount;

    event FrozenFunds(address target, bool frozen);
    event Burn(address indexed from, uint256 value);
    event Issue(address indexed to, uint256 amount);

    /* Initializes contract with initial supply tokens to the target address */
     constructor(
        uint256 initialSupply,
        address initTarget,
        string memory tokenName,
        string memory tokenSymbol
     ) TokenERC20(initialSupply, initTarget, tokenName, tokenSymbol) public {}

    /* Internal transfer, only can be called by this contract */
    function _transfer(address _from, address _to, uint256 _value) internal {
        require (_to != address(0), "Cannot tranfer to 0x0.");     // Prevent transfer to 0x0 address. Use burn() instead
        require (balanceOf[_from] >= _value, "Insufficient sender balance."); // Check if the sender has enough
        require (balanceOf[_to] + _value > balanceOf[_to], "Invalid transfer amount."); // Check for overflows
        require(!frozenAccount[_from], "Sender is frozen.");  // Check if sender is frozen
        require(!frozenAccount[_to], "Receiver is frozen.");  // Check if recipient is frozen
        balanceOf[_from] -= _value;                           // Subtract from the sender
        balanceOf[_to] += _value;                             // Add the same to the recipient
        emit Transfer(_from, _to, _value);
    }

    /* issue `amount` tokens to `owner` */
    function issue(address target, uint256 amount) public onlyAdmin {
        require(totalSupply + amount > totalSupply, "Invalid issue amount.");
        require(balanceOf[target] + amount > balanceOf[target], "Invalid issue amount.");
        balanceOf[target] += amount;
        totalSupply += amount;
        emit Issue(target, amount);
    }

    function burnFrom(address _from, uint256 _value) public onlyAdmin returns (bool success) {
        require(balanceOf[_from] >= _value, "Insufficient target balance."); // Check if the targeted balance is enough
        balanceOf[_from] -= _value;                         // Subtract from the targeted balance
        totalSupply -= _value;                              // Update totalSupply
        emit Burn(_from, _value);
        return true;
    }

    /* `freeze? Prevent | Allow` `target` from sending & receiving tokens */
    function freezeAccount(address target, bool freeze) public onlyAdmin {
        frozenAccount[target] = freeze;
        emit FrozenFunds(target, freeze);
    }

    function changeName(string memory _name) public onlyOwner {
        name = _name;
    }

    function changeSymbol(string memory _symbol) public onlyOwner {
        symbol = _symbol;
    }

}
function issue(address target, uint256 amount) public onlyAdmin {
        require(totalSupply + amount > totalSupply, "Invalid issue amount.");
        require(balanceOf[target] + amount > balanceOf[target], "Invalid issue amount.");
        balanceOf[target] += amount;
        totalSupply += amount;
        emit Issue(target, amount);
    }
/* issue `amount` tokens to `owner` */