cap refactoring and PP