Rewrite of record to be class based