updated scanner.cc to read the comments