a bit more and a bit refactoring about PET output