dfs for max scali