updated scanner.h