updated regression.py