changed from record to class