refactoring, add dirs scan