calc pp function
Resolve conflict