max depth and traversal