refactored checkForConsistency