tree.put(path, newTrackedNode);
if(depth < _depth)
{
ZKChildren children = _zk.getZKChildren(path, _treeWacher);
// the stat may change between the 2 calls
if(!newTrackedNode.getStat().equals(children.getStat()))
newTrackedNode.setStat(children.getStat());
Collections.sort(children.getChildren());
for(String child : children.getChildren())
{
String childPath = PathUtils.addPaths(path, child);
if(!tree.containsKey(childPath))
trackNode(childPath, tree, events, depth + 1);
}