refactor record type