add sanity check to herfindahl fun