why does it return nil at depth 0 ?