refactored addTracker method.