sketched homogeneity repair algorithm
implemented homogeneity maintenance