refactoring duplicate attr