Implemented dfs in lambdman3