SurroundedRegions: change dfs to bfs because of call stack overflow