added the scanner and layout