make computation of nearest neighbour list depth smarter