changed weights in forloop