added to_record and from_record converters