Added depth first search