refactoring PET-chapter