ppc refactor