changed attr_accessor to mattr_accessor for work with inherited models