updates to p3.py