fixed bfs
visibility + small tests