changes in pi.py