refactored saprfc