progress so far on P1 (beginning scanner)