Checks

Added conditions to check integrity .