Replacing insert by udpate