wrote custom attr_accessor