contract FreezableToken is PausableToken {
    mapping(address=>bool) internal _frozenAccount;

    event FrozenAccount(address indexed target, bool frozen);

    /**
     * @dev Return whether the specified address is frozen.
     * @param account A specified address.
     */
    function frozenAccount(address account) public view returns(bool){
        return _frozenAccount[account];
    }

    /**
     * @dev Check if the specified address is frozen. Require the specified address not to be frozen.
     * @param account A specified address.
     */
    function frozenCheck(address account) internal view {
        require(!frozenAccount(account), "Address has been frozen");
    }

    /**
     * @dev Modify the frozen status of the specified address.
     * @param account A specified address.
     * @param frozen Frozen status, true: freeze, false: unfreeze.
     */
    function freeze(address account, bool frozen) public onlyOwner {
  	    _frozenAccount[account] = frozen;
  	    emit FrozenAccount(account, frozen);
    }

    /**
     * @dev Rewrite the transfer function to check if the address participating is frozen.
     */
    function transfer(address _to, uint256 _value) public returns (bool) {
        frozenCheck(msg.sender);
        frozenCheck(_to);
        return super.transfer(_to, _value);
    }

    /**
     * @dev Rewrite the transferFrom function to check if the address participating is frozen.
     */
    function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
        frozenCheck(msg.sender);
        frozenCheck(_from);
        frozenCheck(_to);
        return super.transferFrom(_from, _to, _value);
    }   
}
/**
 *  @title FreezableToken
 */
function frozenCheck(address account) internal view {
    require(!frozenAccount(account), "Address has been frozen");
}

/**
 * @dev Check if the specified address is frozen. Require the specified address not to be frozen.
 * @param account A specified address.
 */