finish priority bestfit dfs