remove some redudant code