So close, a few more edge cases to work out with ids in some records