updated record logic