added attr_accessor to replace getter and setter methods