add dataintegrity as an option on initialization

add dataintegrity as an option on initialization
fix some issues