refactoring LPEF related functions