Separated weight function from divergence measure.