edit checkDataIntegrity function
check data in sync