generating weigths