implemented dfs_rec