successfully replaces a rule and runs the entire algo