new parameters for compute_weights