function foundit = doesChildExist(node,packetSize)
% Have we seen a child of this size before??
% Returns cache index for child if yes, and -1 otherwise
global cache
for c=1:numel(cache(node).child)
    foundit=cache(node).child(c);
    if cache(foundit).size == packetSize
        return;
    end
end
foundit=-1;
end