restored p2.py