cleaned conscan.py