Purity measure added