refactor Record model