refactoring: parse record without recursion