Added parametrized min_weight