created a detect duplicate for updates