added weighting by etropy