Added blacklist using the same dfs function but a different function to check for done.