edited all weights[i].value