Add the MaxDepth method