added check for local clustering