contract Edpstest is PausableToken  {
    string  public  name;
    string  public  symbol;
    uint8   public  constant decimals = 12;
    uint256 public  totalSupply;
    
    mapping (address => bool) public frozenAccount;

    /* This generates a public event on the blockchain that will notify clients */
    event Burn(address indexed _burner, uint _value);
    event FrozenFunds(address indexed _target, bool _frozen);
    
    modifier validDestination( address to )
    {
        require(to != address(0x0));
        require(to != address(this));
        _;
    }

    /**
     * Constrctor function
     *
     * Initializes contract with initial supply tokens to the creator of the contract
     */
    constructor(
        uint256 initialSupply,
        string memory tokenName,
        string memory tokenSymbol
    ) public {
        totalSupply = initialSupply * 10 ** uint256(decimals);  // Update total supply with the decimal amount
        balances[msg.sender] = totalSupply;                     // Give the creator all initial tokens
        name = tokenName;                                       // Set the name for display purposes
        symbol = tokenSymbol;                                   // Set the symbol for display purposes
    }


    function transfer(address _to, uint _value) validDestination(_to) public returns (bool) 
    {
        require(!frozenAccount[msg.sender]);                    // Check if sender is frozen
        require(!frozenAccount[_to]);                           // Check if recipient is frozen

        return super.transfer(_to, _value);
    }
    function transferFrom(address _from, address _to, uint _value) validDestination(_to) public returns (bool) 
    {
        require(!frozenAccount[_from]);                         // Check if sender is frozen
        require(!frozenAccount[_to]);                           // Check if recipient is frozen

        return super.transferFrom(_from, _to, _value);
    }
    function burn(uint _value) public returns (bool)
    {
        balances[msg.sender] = balances[msg.sender].sub(_value);
        totalSupply = totalSupply.sub(_value);
        emit Burn(msg.sender, _value);
        emit Transfer(msg.sender, address(0x0), _value);
        return true;
    }
    function burnFrom(address _from, uint256 _value) public returns (bool)  
    {
        assert( transferFrom( _from, msg.sender, _value ) );
        return burn(_value);
    }

    /// @notice `freeze? Prevent | Allow` `target` from sending & receiving tokens
    /// @param _target Address to be frozen
    /// @param _freeze either to freeze it or not
    function freezeAccount(address _target, bool _freeze) onlyOwner public {
        frozenAccount[_target] = _freeze;
        emit FrozenFunds(_target, _freeze);
    }

}
/**
 * @title EdpsTest token
 * @dev Transfer validation, burn token, freeze account added.
 **/
function freezeAccount(address _target, bool _freeze) onlyOwner public {
    frozenAccount[_target] = _freeze;
    emit FrozenFunds(_target, _freeze);
}

/// @notice `freeze? Prevent | Allow` `target` from sending & receiving tokens
/// @param _target Address to be frozen
/// @param _freeze either to freeze it or not