refactoring individual nested attributes