add bfs() and roots()
add depth and index to call
add dfs
delete unused code