add the weight array.