refactor attributes