revised use of attr_accessor