collapse delete statements
simplify insert of new records