refactoring: write_attribute => using setter method with the receiver self