updated scanner.c