implemented DFS, Wow it actually works!!