refatoring - rename
refactoring - rename
separate class to use also in dfs