delete records before updating