moved scanner class to scanner.py