graph stuff: bfs,dfs,etc.