Revert "Revert "updated pp code""

This reverts commit 22dc8ef08bf9551246ff19ef8385ab2758bdb2a0.