removes redudent function