add breadth first search in lattice and tested