fixing epireg.py code