remove redundant lines