update grid lock dfs calculation