achieve the first part of the scanner