record refactoring