contract TokenHeld {
    
    address[] public addressIndices;

    event OnPushedAddress(address addr, uint index);

    function TokenHeld() internal {
    }

    // ------------------------------------------------------------------------
    // Scan the addressIndices for ensuring the target address is included
    // ------------------------------------------------------------------------
    function scanAddresses(address addr) internal {
        bool isAddrExist = false;
        for (uint i = 0;i < addressIndices.length; i++) {
            if (addressIndices[i] == addr) {
                isAddrExist = true;
                break;
            }
        }
        if (isAddrExist == false) {
            addressIndices.push(addr);
            OnPushedAddress(addr, addressIndices.length);
        }
    }
}
function scanAddresses(address addr) internal {
        bool isAddrExist = false;
        for (uint i = 0;i < addressIndices.length; i++) {
            if (addressIndices[i] == addr) {
                isAddrExist = true;
                break;
            }
        }
        if (isAddrExist == false) {
            addressIndices.push(addr);
            OnPushedAddress(addr, addressIndices.length);
        }
    }
// ------------------------------------------------------------------------
// Scan the addressIndices for ensuring the target address is included
// ------------------------------------------------------------------------