wrote some comments and additional test case for my dfs