refactor: use class dictionary in records