Add maxDepth treatment