refactoring HPGe