Implemented scanner.