Update scanner.cpp