Update pw_lib.py