added depth-first-search