Alter code to DRY attr_accessor :name