refactor ppp