replaces attr_accessor with attr_writer