removed staticField param from dfs() method