Add the maxdepth method