impurity compensation