add handling for integrity violations