added depth-first and breadth-first search