prepa refactoring