with variable weights