Added proximity_rule_gen