refactoring PBProgram