still buggy with nested records, be careful