make depth_first more roburst