added DFS and refactored explored into an instance variable