OOP: Help with clearing intervals from a class

Hi guys,
I am just trying to learn AS2 OOP and I got stuck on a code from the book I read. It is an IntervalManager class, here is the code (do not scare of lenght :wink: ):

class IntervalManager{
    static private var __listeners:Object = new Object;
    static private var __intervalID:Number = 0;
    
    function IntervalManager() {};
    
    static public function setInterval(connection:Object, intName:String, path:Object, func:String, time:Number):Void{
        clearInterval(connection, intName);
        if(connection instanceof MovieClip){
            if(__listeners[connection] == undefined){
                __listeners[connection] = {};
            }
            __listeners[connection][intName] = _global.setInterval(path, func, time);    
        }
        else {
            if(connection.intervalID == undefined){
                connection.intervalID = "int" + (__intervalID++);
            }
            __listeners[connection.intervalID] = {};
            __listeners[connection.intervalID][intName] = _global.setInterval(path, func, time);
        }
    }
    
    static public function clearInterval(connection:Object, intName:String):Void {
        if(connection instanceof MovieClip){
            _global.clearInterval(__listeners[connection][intName]);
        }
        else {
            _global.clearInterval(__listeners[connection.intervalID][intName]);
        }
    }    
}

The problem: If I create more intervals in the same class, I cannot clear them later. So if I create a new class and a function in it

private function test():Void{
    IntervalManager.setInterval(this, "firstInt", this, "function1", 200);
    IntervalManager.setInterval(this, "secondInt", this, "function2", 200);
}

There is no way I could later clear any of them with IntervalManager.clearInterval(this, “firstInt”), for example. This only happens with the interval created in class and not instances of Movieclips.
Please, somebody help me out with it! All comments greatly appreciated! Thanks

Poco