simplify extractPrimaryRecord