refactor the autoScanner to use nodes