adding depth first search