fix weights to sum 1