set max depth