dfs and bfs working perfectly :)