switch to BFS for naive_closest