WIP Modifing pac.py to be as similar as possible to Remy's code