scan refactoring