refactoring and editing of record