Started writing the scanner