Fixed type from threshold to depth as it's easier to understand