refactoring the primer model and helper