Modify the P1, P2, P3 calculation method