remove redundent lines