Use attr_writer and reader instead of create the method manually