- complete rewrite from check values in serial.pl