modify DFS.
add online DFS.