surrounded regions, bfs with matrix