removing the redundant lines