Completely changed updateREcord implementation