remove redundant lines from rules