Minor modification for anlaysis.py