check ac3 result
add dfs implementation