improve record validation

I think this is a much more cleaner way to validate the records.