Add possibility to specify the weight