pg.py changes