more modifications to the pa calculation