record refactor