refactor attributes and attributes properties